Registering a device
Request
Before a client application can receive notifications, it must register with Open Device Messaging (ODM). To do this, it should send a POST request to:
http://<host>:<port>/odm/v1/opendevice/{deviceId}/queue
After a session ends or the device logs out, it will have to make this same request again, passing the new token that it received from FCM or AWS IoT Core.
Headers
Content-Type: application/json
token
– the token that was returned by IAS when the device signed onEither:
fcm-token
– the FCM token that was returned when the device registered with Google Firebase (not applicable for FireTV)iot-token
– the token that was received when the device registered with AWS IoT Core (webOS and Tizen Smart TVs only)
Mandatory fields
deviceId
(in URL) – the unique device ID that was assigned to the device when it first signed in to IAS (and the device was created in ADM).If the app is uninstalled and then reinstalled on the same device, a new
deviceId
is assigned to it when it signs in again.
Response
A successful request returns an HTTP 201 status.
An unsuccessful request returns an HTTP 400 status if there was a problem with the request.
If the device is already registered, the request returns an HTTP 409 status.
See also
For full details of this API, see the Open Device Messaging (ODM) API Documentation.