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": ""
}
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;
Last updated