Verify

class telesign.api.Verify(customer_id, secret_key, ssl=True, api_host='rest.telesign.com', proxy_host=None, timeout=None)

The Verify class exposes several services for sending users a verification token. You can use this mechanism to simply test whether you can reach users at the phone number they supplied, or you can have them use the token to authenticate themselves with your web application.

This class also exposes a service that is used in conjunction with the first two services, in that it allows you to confirm the result of the authentication.

You can use this verification factor in combination with username & password to provide two-factor authentication for higher security.

Attributes  
customer_id A string value that identifies your TeleSign account.
secret_key A base64-encoded string value that validates your access to the TeleSign web services.
ssl (optional) Specifies whether to use a secure connection with the TeleSign server. Defaults to True.
api_host (optional) The Internet host used in the base URI for REST web services. The default is rest.telesign.com (and the base URI is https://rest.telesign.com/).
proxy_host (optional) The host and port when going through a proxy server. ex: “localhost:8080. The default to no proxy.
timeout (optional) A timeout value to use in requests - float or tuple (see requests documentation for details). Defaults to None.

Note

You can obtain both your Customer ID and Secret Key from the TeleSign Customer Portal.

Methods

sms Sends a text message containing the verification code, to the specified phone number (supported for mobile phones only).
call Calls the specified phone number, and using speech synthesis, speaks the verification code to the user.
status Retrieves the verification result.