REST Web Service Interface
The Amernet REST API allows you to query meta-data about your account, phone numbers, calls, text messages, and recordings. You can also do some fancy things like initiate outbound calls and send text messages.
Since the API is based on REST principles, it’s very easy to write and test applications. You can use your browser to access URLs, and you can use pretty much any HTTP client in any programming language to interact with the API.
All URLs referenced in the documentation have the following base:
The Amernet REST API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.
This area describes the UnifiedAPI demo Apps providing examples for each app:
- CallMeButton — This page describes an App that uses UnifiedAPI to place phone calls and returns the status of the call to the user.
- Click2Conference — This page describes an App that uses UnifiedAPI to invite a group of users to a conference call.
- Click2Fax — This page describes an App that uses UnifiedAPI to send faxes.
- FacebookCallMe — This page describes FacebookCallMe, a small App that allows anyone to place a call through a Facebook App.
Place a Phone Call
To place the phone call, the App uses the Unified API Create Simple PhoneCalls request. It uses the extension defined in the global variable VN_EXTENSION as the source of the call as in the example below. All fields are fictitious.
The code that makes the request can be found in <Path_To_CallMeButton>/interface/plib/lib.php and is described below:
The source and extension request parameters can be different as described in the Create Simple PhoneCalls recommendations. The CallMeButton App uses the same extension for both parameters.