Message of the Day (MOTD) Endpoint

Message of the Day (MOTD) Endpoint

PTT Pro users on WS50 can now receive MOTD (Message of The Day) voice messages with a prerecorded announcement to a user or a group of users. The MOTD endpoint enables users to send short text or audio messages as broadcast messages. Messages are sent using the Google Cloud Pub/Sub messaging service. MOTD notifications have a 64-character limit, notificaitons with more characters will be truncated.
Use the following endpoints for MOTD.
Method
Description
POST api/v1/register/user
Register the user with the device type of
DeviceTypeAndroidWearable(300)
to receive message notifications.
GET /api/v1/client/message/recent
Retrieve the most recent messages from the user.
POST /api/v1/signout/user
Sign out the user and de-register the push ID.

MOTD Example

This example registers a user to receive notifications from the GCP Pub/Sub service.
curl -X 'POST' \ 'https://<ZEMS_URL>/api/v1/register/user' \ -H 'accept: application/json' \ -H 'ApiKey: <ZEMS_API_KEY>' \ -H 'Content-Type: application/json' \ -d '{ "device_push": { "device_id": "", "device_type": 300, "push_id": "", "push_route": "" }, "password": "", "server": "", "settings": "", "userlogin": "" }'
This example retrieves the three most recent messages from the user.
curl -X 'POST' \ 'https://<ZEMS_URL>/api/v1/client/message/recent?numberOfMessage=3 \ -H 'accept: application/json' \ -H 'ApiKey: <ZEMS_API_KEY>' \ -H 'authorization: Bearer <TOKEN>' \ -H 'Content-Type: application/json' \
This example signs out the user and de-registers the push ID. This command is called by a client when the user signs out.
curl -X 'POST' \ 'https://<ZEMS_URL/api/v1/signout/user ‘ \ -H 'accept: application/json' \ -H 'ApiKey: <ZEMS_API_KEY>' \ -H 'authorization: Bearer <TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "device_id": "", "device_type": 300, "push_id": "", "push_route": "" }'