Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

No description, website, or topics provided.

Resources

Packages

No packages published

Languages