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.
Base URL
All URLs referenced in the documentation have the following base:
https:
//uc.amer.net/uapi/
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:
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.
POST /uapi/phoneCalls/ @me /simple HTTP/ 1.1 HOST x.x.x.x Content Type: application/json Authorization: <OAUTH_ACCESS_TOKEN> { "extension" : "<VN_EXTENSION>" , "phoneCallView" :[ { "source" :[ "<VN_EXTENSION>" ], "destination" :[ "8887777" ] "callerId" : "CallMeButton <8887777>" } ] } |
The code that makes the request can be found in <Path_To_CallMeButton>/interface/plib/lib.php and is described below:
// Fetch token $token = getToken(); $headers = array ( 'Content-type' => 'application/json' , 'Authorization' => $token ); // Initialize the cURL request $request = new cURLRequest(); $request ->setMethod(cURLRequest::METHOD_POST); $request ->setHeaders( $headers ); $jsonRequest = array ( 'extension' => $config [ 'VN_EXTENSION' ], // Number of the extension configured to run with CallMeButton 'phoneCallView' => array ( array ( 'source' => array ( $config [ 'VN_EXTENSION' ]), // Number of the extension configured to run with CallMeButton 'destination' => $phoneNumber // The phone number entered in the form field. ) ); $request ->setBody(json_encode( $jsonRequest )); // Receive the response in JSON format $response = $request ->sendRequest( $reqUrl ); |
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.
We are Amer 10 years of experience in this field with the most talented people and leaders.
Phone: | 1.877.616.5100 |
---|---|
Website: | www.amer.net |
Address: | Established since 1995 - Our main office is located in the heart of San |
Early Bird Offers for new domain registration valid for a limited time only the terms and conditions may apply Clice Here