Skip to main content

Telesign SDK

Project description

TeleSign provides the world’s most comprehensive approach to account security for Web and mobile applications.

For more information about TeleSign, visit the TeleSign website.

TeleSign REST API: Python SDK

TeleSign web services conform to the REST Web Service Design Model. Services are exposed as URI-addressable resources through the set of RESTful procedures in our TeleSign REST API.

The TeleSign Python SDK is a set modules and functions — a Python Library that wraps the TeleSign REST API, and it simplifies TeleSign application development in the Python programming language. The SDK software is distributed on GitHub and also as a Python Software Package using the Python Package Index (PyPI).

Documentation

Detailed documentation for TeleSign REST APIs is available in the Developer Portal.

Installation

To install the TeleSign Python SDK:

$ pip install telesign

Alternatively, you can download the project source, and execute python setup.py install.

Python Code Example: Messaging

Here’s a basic code example with JSON response.

from __future__ import print_function
from telesign.messaging import MessagingClient

customer_id = "customer_id"
secret_key = "secret_key"

phone_number = "phone_number"
message = "You're scheduled for a dentist appointment at 2:30PM."
message_type = "ARN"

messaging_client = MessagingClient(customer_id, secret_key)
response = messaging_client.message(phone_number, message, message_type)
{'reference_id': 'DGFDF6E11AB86303ASDFD425BE00000657',
 'status': {'code': 103,
    'description': 'Call in progress',
    'updated_on': '2016-12-12T00:39:58.325559Z'}}

For more examples, see the examples folder or visit TeleSign Developer Portal.

Authentication

You will need a Customer ID and API Key in order to use TeleSign’s REST API. If you are already a customer and need an API Key, you can generate one in the Portal.

Testing

The easiest way to run the tests is to install nose (pip install nose) and run nosetests in the root of the distribution. Tests are located in the test/ directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

telesign-2.0.0.tar.gz (7.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page