The Appoxee API allows you to access major parts of Appoxee back-end functionality, both from the Server side and from the Device side.
The Service API is used mainly mainly used to send Push notifications to devices (see XXX Push Message API). Other operations are performed through the SDK API (see Android SDK API Usage and iOS SDK API Usage).
API Request
All data must be sent to the API in the JSON format, as an HTTP POST request. The data content type must be set to "applicaiton/json".
...
Additional security parameter added to ensure that no request is sent twice – the “random” parameter. This parameter added to JSON data, and the developer must ensure that it is random for every request. The Appoxee server checks each request's signature and random parameter, and rejects duplicated requrest.
Request URL
The URL for the Service API is 'http://saas.appoxee.com/api/'A
Request Arguments
The request must provide the following constants arguments (this example is given in the PHP format, for server-side usage):
- define('AppSDKKey', 'xxxx-xxxx-xxxx-xxxx');
- define('SECRET', 'mySecretCode'); // Application Secret
- define('URL', 'http://api.appoxee.com/api/');
Name | Syntax | Description |
---|---|---|
AppSDKKey |
...
SECRET | 'mySecretCode'); // Application Secret | |
URL | 'http://api.appoxee.com/api/' |
...
Note |
---|
Appoxee API variables and parameters consist of case-sensitive keys (alpha-numeric value, starting with a letter) and their length should be under 100 characters. |
Authentication Signature
Appoxee's API security model ensures that every request has a unique secret signature.
This signature is passed as a parameter inside the “auth” JSON object (along with additional authentication-related information).
Signature parameters:
Parameter | Description | Example |
timestamp | the current time in a Unix timestamp in seconds | 1330607184 |
AppSDKKey | Appoxee secret code which is given per App. See it at Appoxee website (Settings->Apps & SDK Keys ->Your App ) | xxxxx-xxxxx-xxxxx-xxxxx |
SECRET | Appoxee secret code which is given per App to use specifically in API | sadfanbldkjfbslkdfnb |
signature | Created by using the MD5 hash function with the concatenation of the above parameters. The order is important | 65bd1d345fffc487ab1f15d837e94b38 |
random | Unique request parameter (can be used uniqid() or “random()”.) | 4f5cc37a93463 |
...
{
"response": "Success",
"result": [“tag1”, “tag2”]
}
Example Error Response for a Badly Formed Request
{
"response": "Error",
"code": 0,
"message": "Invalid request"
}
...