Notify Service: Notify Mobile API
This api service allows you to send mobile push notifications to a specific device. In order to use this, your user must download the Expo Go mobile app and scan the QR code for the Cliqet Notify mobile app. Once they open the Cliqet Notify mobile app from the Expo Go mobile app, their device will be registered and the app will display their unique Cliqet subscriber ID. This subscriber ID is unique for every device and must be passed when calling the api in order to target the notification to the specific device. This means that you must have this subscriber ID as well and must ask it from the user. Example would be giving them instructions on how to launch Cliqet Notify mobile app and asking them to register the subscriber ID on your system. On Android devices, the QR code scanner is available on Expo Go and you may scan the QR code of the Cliqet Notify mobile app directly from Expo Go. For iOS devices, as long as they have the Expo Go app installed, any QR code scanner on their phone will work and will open the Cliqet Notify app automatically from Expo Go.
To download Expo Go mobile app, click here
To run Cliqet Notify mobile app in Expo Go, scan the following QR codes.
Android

iOS

Screenshots of Cliqet Notify mobile app
Publishers Page

Notifications Page

There is no need for a message template to be reviewed and you have the freedom to send different kinds of notification messages such as sending an OTP code or notifying them that they have to do some certain action in your app. Although there is freedom in the message you can send unlike in other services where you need to ask for approval when sending SMS messages, please take note that a user can unsubscribe to you at any time and once they do, you will no longer be able to send notification to the specific user. If Cliqet receives numerous complaints from your notifications due to misuse, Cliqet reserves the right to deactivate your notify mobile service.
Request Body: JSON
{
"service": "notify-mobile",
"payload": {
"subscriber_id": "<USER SUBSCRIBER ID>",
"message": "<YOUR MESSAGE>",
"webhook_name": "<YOUR WEBHOOK NAME IDENTIFIER>",
"source_id": "<UNIQUE ID FOR REQUEST>"
}
}
Request Body Definition
- service - This defines the service that we want to use
- payload - Information needed in order for the service to process the request
- payload.subscriber_id - This is the unique subscriber ID generated by the Cliqet Notify mobile app when launched.
- payload.message - This is the message you want to send to the subscriber or user. There is a LIMIT of 200 characters.
- payload.webhook_name - This is the name of the webhook endpoint where you would like to receive the results. The name is what you have assigned when you added the webhook.
- payload.source_id - This is a unique identifier that you generate for the request so that when you receive it in the webhook, you can identify which request the webhook data belongs to.
Sample Response
{
"message": "notify-mobile request received",
"remaining_credits": 92
}
If your request is not successful, you will receive a message from the json response describing the error. Possible errors may be due to:
- Invalid API token with status code 401
- Invalid service name with status code of 422
- Not enough credits with status code of 422
- Invalid payload with status code of 422
Webhook Data Received: JSON
There are 2 events that you can receive in your webhook endpoint when using the notify mobile service. These are:
- When your notification has been delivered
- When a user has interacted with the notification
Webhook Data Received on Notification Delivery
This event is sent to your webhook endpoint when the notification has been sent to the device. Although this is usually instant, it is possible that there may be some delays in the actual receipt of the notification on the user's device. Below is a sample of what the webhook data would look like for this event.
{
"source_event": "notify-mobile",
"payload": {
"subscriber_id": "<USER SUBSCRIBER ID>",
"message": "<YOUR MESSAGE>",
"source_id": "<YOUR UNIQUE REQUEST ID>"
},
"error": null,
"completed_at": "2024-01-13T05:39:48.966984+00:00"
}
Webhook Data Received on Notification Interaction
This event is sent to your webhook endpoint when a user has clicked on the notification upon arrival on the device. This event means that the notification has been received by the device and that the user has seen it and tapped on it. Take note that this does not mean that the user has fully read your message. When your message is longer than what the mobile notification can display, then only a portion will be seen. When a user clicks on the notification, they are redirected to the Cliqet Notify app and go straight to their notifications list page. Once on that page, a user can view the full message by clicking on the message from the list. Below is a sample of what the webhook data for this event might look like. Take note of the event source which is different from the notification delivery event.
{
"source_event": "notify-mobile-read'",
"payload": {
"subscriber_id": "<USER SUBSCRIBER ID>",
"source_id": "<YOUR UNIQUE REQUEST ID>"
},
"error": null,
"completed_at": "2024-01-13T05:39:48.966984+00:00"
}
Webhook Data Definition
- source_event - The name of the service
- error - The error message if there was an error processing the request or null if processing was successful.
- completed_at - The time the process was completed and sent to your webhook endpoint. It follows the ISO 8601 format.
- payload.subscriber_id - The subscriber_id that you sent with the initial request.
- payload.message - The message that you sent with the initial request.
- payload.source_id - This is a unique identifier that you sent with the initial request.