A device's access token will expire after 7 days. To ensure the device always has a valid token, it should periodically send a request to the /loginDevice
endpoint.
POST /loginDevice
The endpoint expects the following fields in JSON format:
token
- the device's current access token (even if it is expired)cpu_id
- the device's CPU IDuuid
- the device's UUID
Do not use form-data
for the request body. If you are testing with Postman, you should select the raw
option.
- If one of the fields was missing or given an incorrect value, the endpoint will return a
400
response. - If the token is valid, the endpoint will return a
200
response. - If the token is valid but expires within 12 hours, the endpoint will return a
201
response with atoken
field in the body.- The device should use the new token for all future requests.
- If the token is expired, the endpoint will return a
201
response with atoken
field in the body.- The device should use the new token for all future requests.