No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
examples
tests
twizo_lib_python3.egg-info
.gitignore
CHANGES.txt
MANIFEST
MANIFEST.in
README.md
setup.py

README.md

Twizo

Twizo Python API

Connect to the Twizo API using the python 3 library. This API includes functions to send verifications (2FA), SMS and Number Lookup.

Requirements

Get application secret and api host

To use the Twizo API client, the following things are required:

Installation

pip -- Link needs to be added

$ pip install twizo-lib-python

Getting started

Initialize the Twizo API with your api host and api key

from twizo import Twizo

twizo = Twizo(api_key="<Your api key here>",
              api_host="<Your desired api host here>")

Create a new verification

    params = VerificationParams('12345000000')
    response =  twizo.verification_controller.create(params)

Verify token

    verify_result =  twizo.verification_controller.verify_token(
        response.messageId, "012345"
    )

Send sms

    params = SmsParams(
        recipients='60123456789',
        body="Hey Alice, how are you doing?", 
        sender='John')
    response = twizo.sms_controller.send_simple(params)

Examples

In the examples directory you can find some examples of how to use the api.

License

The MIT License. Copyright (c) 2016-2017 Twizo

Support

Contact: www.twizo.comsupport@twizo.com