Sending Remote Notification
Sends remote notifications to users.
![]() | How to use Remote Notification API For more details on how to use the Remote Notification API, please refer to the following pages. ngCore SDK | Native SDK | Unity SDK |
URI Fragment
/remote_notification/@app/{groupId}
/remote_notification/@app/@all/{recipientId}
Parameter Name | Type | Description |
---|---|---|
groupId | String | Either @all, @android or @ios can be used. |
recipientId | User ID | Mobage user ID to which remote notification is sent to. Only one user can be specified. |
Supported Signing Methods
Client Only Signing, 3-legged Authorization Signing
![]() | 3-legged Authorization Signing cannot be used with broadcast notifications (@all, @android, @ios). |
![]() | Please refer here for the details of authentication flow and here for how to sign request to generate the Authorization header. |
HTTP Method
POST
Request Header
- The Authorization header is necessary for this call to succeed.
- Content-Type: application/json; charset=utf-8
URL Query Parameters
None.
Request Body
A JSON string with the following keys and values. Please refer to the examples below for the actual JSON string.
Name | Type | Description | Required |
---|---|---|---|
recipientId | UserId Array | An array of user ID to whom remote notification is sent to. A maximum of 1000 users can be specified. Used together with @all, @android and @ios. | No |
payload | Object | Additional parameters passed to the device. | Yes |
payload.message | String | A UTF-8 formatted string that forms the body of the message. | Yes |
payload.badge | Integer | This number determines the badge used for notifications sent to iOS devices. If no badge is included, no numeric badge is sent. This field has no effect for Android target devices and does not count toward payload size constraints. | No |
payload.sound | String | The name of the sound in the application bundle to play for notifications on iOS devices. Plays the default sound when the specified sound file is not found or when the value is default . This field has no effect for Android target devices and does not count toward payload size constraints. | No |
payload.collapseKey | String | The collapse key to combine multiple messages on an Android device into a single group, displaying the most recent notification only. When no key is specified, all notifications use the same collapseKey. This field has no effect for iOS target devices and does not count toward payload size constraints. | No |
payload.style | String | A hint that contains the preferred layout style for the system notification tray on Android devices. If no style is given or the provided style is not available, the default Mobage style will be used. Valid styles are normal and largeIcon . This field has no effect for iOS target devices and does not count toward payload size constraints. | No |
payload.iconUrl | String | The icon URL that determines the image shown in the notification bar for Android devices for notification payloads that include a style attribute. If this field is not specified, the default Mobage icon image is shown. This field has no effect for iOS target devices and does not count toward payload size constraints. | No |
payload.extras | Object | Custom 1 level hash of key/value parameters defined by the developer. The string key for each item in this section cannot contain any of the payload's defined key values. | No |
![]() | The combined size of all the serialized parameters of the |
Response Status Code
HTTP Status Code |
HTTP Status Message |
Meaning |
---|---|---|
201 |
Created |
Data successfully created. |
202 |
Accepted |
Request was accepted for processing. |
400 |
Bad Request |
Corrupt request data on the client side |
401 |
Unauthorized |
Authorization error |
403 |
Forbidden |
The resource exists, but access is not possible due to a reason other than an authorization error. |
404 |
Not Found |
The resource does not exist. |
429 |
Too Many Requests |
Your app server is sending too many similar requests within a fixed period of time. |
500 |
Internal Server Error |
An error on the API server side |
503 |
Service Unavailable |
The API cannot be used temporarily |
Response Body
- A JSON string about the result of sending remote notification request, can be empty.
- Content-Type: application/json; charset=utf-8