Skip to content

Set Registration Token

Request

Set Registration Token for the device.

Errors

Error CodeError TypeError Message
-1008MISSING-DEVICEIDdeviceId field missing
-1035ERR_REG_TOKENInvalid deviceId or deviceType, RegistrationToken not updated
Security
accessToken
Query
deviceIdstringrequired

A string to uniquely identify the application requesting the access token. If a user could feasibility login to two instances of the same application (eg. two organisations in the same CRM), each of these should provide a unique deviceId (eg. by appending the organisation ID to the name of the application). This ensures that separate access tokens are generated for each instance, so that, for example, logging out of one instance doesn't remove access from the other.

devicestringrequired

Identifier of the mobile handset, "ios" for APPLE and "adt" for ANDROID

registrationTokenstringrequired

A string to uniquely identify the registration token.

fcmProjectIdstring

A string idendifying the fcmProjectId.

curl -i -X POST \
  'https://p3.avanser.com/app/setregistrationtoken?deviceId=string&device=string&registrationToken=string&fcmProjectId=string&token=YOUR_API_KEY_HERE'

Responses

Registration token set.

Bodyapplication/json
timestampintegerrequired

The time that the API response left the server, represented as the number of seconds since the UNIX epoch.

Example:1508903167
exectionnumber

The number of seconds that it took to process the API request.

Example:0.00041531896591187
errorbooleanrequired

Boolean indicating whether there was an error returned by the API request.

Example:false
datastringrequired

The data returned by the API. The format varies depending on the API function that was called.

Response
{ "timestamp": 1508903167, "exection": 0.00041531896591187, "error": false, "data": "OK" }