Device Token
Get second device token for device
TT MOBILE ALGORITHM ENDPOINT
Get second device token
POST https://kitkot.xyz/api/algorithms/device/token
Returns the second device token for the device
Query Parameters
Name
Type
Description
api_key*
String
The api_key you got when purchasing our service
Request Body
Name
Type
Description
dev_info*
Object
Your device information object.
{
"msg": "success",
"code": 200,
"token": ""
}{
"code": 400,
"msg": "Missing region in dev_info"
}{
"msg": "Found no dev_info in payload",
"code": 400
}const fetch = require('node-fetch');
const API_URL = "https://kitkot.xyz/api/algorithms";
const api_key = "my-api-key";
const request = await fetch(`${API_URL}/device/register?api_key=${api_key}`);
const response = await request.json();
let dev_info = response.dev_info;
const dTokenRequest = await fetch(`${API_URL}/device/token?api_key=${api_key}`, {
headers: {'content-type': 'application/json'},
body: JSON.stringify(dev_info)
})
const dTokenResponse = await dTokenRequest.json();
dev_info["secDeviceIdToken"] = dTokenResponse.token;import requests
import json
API_URL = "https://kitkot.xyz/api/algorithms"
api_key = "my-api-key"
request = requests.get(f'{API_URL}/device/register?api_key={api_key}')
response = request.json()
dev_info = response["dev_info"]
headers = {'content-type': 'application/json'}
dTokenRequest = requests.post(f'{API_URL}/device/token?api_key={api_key}', headers=headers, data=json.dumps(dev_info))
dTokenResponse = dTokenRequest.json()
dev_info["secDeviceIdToken"] = dTokenResponse["token"]Last updated