| Info: | For more information, visit the TeleSign web site. For the latest source code, visit the TeleSign github repository. |
|---|---|
| Author: | Telesign Corp. |
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 Java SDK is a Java library that provides an interface to TeleSign Web Services.
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 Client Portal. If you are not a customer and would like to get an API Key, please contact support@telesign.com
You supply your credentials to the API by passing them in during class initialization.
>>>
String customer_id = "CUSTOMER_ID_GOES_HERE";
String secret_key = "SECRECT_KEY_GOES_HERE";
Verify verify = new Verify(customer_id, secret_key);With just two classes, telesign.api abstracts much of the complexity of the TeleSign REST API.
| Java Class | Description |
|---|---|
| com.telesign.phoneid.PhoneId | The PhoneId class exposes three services that each provide information about a specified phone number.
|
| com.telesign.verify.Verify | The Verify class exposes two services for sending users a verification token (a three to five-digit number). 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. In addition, this class also exposes a service that 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.
|
Here's a basic code example.
>>>
String customer_id = "CUSTOMER_ID_GOES_HERE";
String secret_key = "SECRECT_KEY_GOES_HERE";
Verify verify = new Verify(customer_id, secret_key);
VerifyResponse ret = verify.call("13103409700");{"reference_id":"013C8CC050DF040BE4D412D700002101","resource_uri":"/v1/verify/013C8CC050DF040BE4D412D700002101","sub_resource":"call","errors":[],"status":{"updated_on":"2013-01-30T18:37:59.444100Z","code":103,"description":"Call in progress"},"verify":{"code_state":"UNKNOWN","code_entered":""}}
Build the jar using ant jar. Generated jar can be found in the build/jar/ directory.
Documentation can be generated by running ant doc. Generated documentation can be found in the doc/build/ directory.
Detailed documentation for TeleSign™ REST APIs is available in the Client Portal
You will need junit installed to generate run the tests. You can execute the test by running ant junit.
The easiest way to run the tests is to install junit Tests are located in the test/ directory.
For more information about the Phone Verify and PhoneID Standard services, please contact your TeleSign representative:
Email: support@telesign.com