Skip to content

Latest commit

 

History

History
74 lines (48 loc) · 1.77 KB

README.md

File metadata and controls

74 lines (48 loc) · 1.77 KB

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