Push Notifications
Last updated
Last updated
The MOTAR API can be used to send mobile push notifications. Make sure you have enabled and configured push notifications in MOTAR Studio for your app before using these endpoints. You also must be able to generate an iOS device token or Android registration ID to register a user to receive notifications in your app.
Reminder: if you are using an app/client ID in sandbox, you must use sandbox.playportal.io
as the endpoint for your requests. Requests to api.playportal.io
with a sandbox client ID will fail!
PUT
https://api.motar.io/notifications/v1
Sends a Push Notification to a user.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
PUT
https://api.motar.io/notifications/v1/register
Register's a user's session for receiving notifications. Note that this route must be called every time a user logs in to ensure they will receive notifications from other users.
GET
https://api.motar.io/notifications/v1
Register's a user's session for receiving notifications. Note that this route must be called every time a user logs in to ensure they will receive notifications from other users.
POST
https://api.motar.io/notifications/v1/acknowledge
Sets a notifications acknowledge flag to true.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Authorization
string
Auth token generated by user login.
path
string
Can be specified to direct the app to open a specific view when the notification is open.
textParameters
string
Inserts dynamic strings into a notification's text.
persist
string
Determines whether the resulting notification is saved on the AFCreate servers to be returned in a user's notification list.
receiver
string
User ID of the notification recipient.
text
string
Text of the notification.
Authorization
string
Auth token generated by user login.
deviceToken
string
IOS or Android device token.
refreshToken
string
Refresh token of the session the user wishes to register for push notifications.
acknowledge
boolean
Whether or not to return acknowledge notifications.
limit
integer
Page size to return.
page
integer
Page number to return.
since
string
Date string, return all notifications created after this date.
Authorization
string
Auth token generated by user login.
Authorization
string
Auth token generated by user login.
notificationId
string
ID of the notification to acknowledge.