Request
Url are case sensitive for this Api
URL
Protocol
- HTTPS
Request Methods
- GET
Request Parameters
Parameters | Tpye | Requirement | Default | Expample | desc |
---|---|---|---|---|---|
client_key | string | Y | 12345 | private key | |
time | int | Y | 1496734816 | the time stamp | |
token | string | Y | b4d230910ae5f97ada8ee8907afd0cd278b1455b79c83c480892da8014ada1aa | generate token by your side ,the return 401 will be error | |
return_type | string | N | json | json | the value of result could be json or link. |
campid | string | N | 无 | 486118 | OfferId 486118,486120,486121 |
geo | string | N | 无 | ru,si,cy | Country code ru,si,cy |
platform | string | N | 无 | android | offer platform,default all,range in [android,ios,all,windows,others] |
Signature Algorithm
Step 1:
- Sort parameter names in ascending alphabetical order based on their ASCII encoded names
- ex.client_key=your_client_key&client_secret_key=your_client_secret_key&return_type=json&time=timestmp_of_current
Step 2:
- Perform sha256 arithmetic on The first step gets the string.
- ex. $token = hash('sha256', 'client_key=your_client_key&client_secret_key=your_client_secret_key&_&return_type=jsontime=1524453257');
Setp 3:
- Add "token= $token" in the url.
- ex. https://open.3s.mobvista.com/channel/v5?client_key=your_client_key&return_type=json&time=1524453257&token=xxxxxxxxx
Please contact with your account manager to get your unique client_key and client_secret_key.
Example for php
$client_key = 'your_client_key';
$client_secret_key = 'your_client_secret_key';
$base_url = 'https://open.3s.mobvista.com/channel/v5';
$params = [
'time' => time(),
'client_key' => $client_key,
'client_secret_key' => $client_secret_key,
'return_type' => 'json'
];
ksort($params);
$token = hash('sha256', http_build_query($params));
unset($params['client_secret_key']);
$params['token'] = $token;
$url = sprintf('%s?%s', $base_url, http_build_query($params));
echo file_get_contents($url) . PHP_EOL;