This is the advanced push API v2.
Operation description
Before using this API, review the pricing and billing methods for EMAS Mobile Push.
This API supports Android, iOS, and HarmonyOS. For each platform, pass its assigned AppKey.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mpush:PushV2 |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppKey |
integer |
Yes |
AppKey value. |
****530646 |
| IdempotentToken |
string |
No |
An idempotency token to prevent duplicate pushes caused by client-side retries. If you call this API with the same IdempotentToken within 15 minutes, only one push is sent. Subsequent calls return the result of the first successful push. Note
|
c8016d13-6e76-****-9bda-769383d11787 |
| PushTask | PushTask |
Yes |
Push task definition. |
For more information, see the PushV2 API integration guide.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| MessageId |
string |
ID of the push message. |
11747540****88320 |
| RequestId |
string |
ID of the request. |
159E4422-6624-****-8943-DFD98D34858C |
Examples
Success response
JSON format
{
"MessageId": "11747540****88320",
"RequestId": "159E4422-6624-****-8943-DFD98D34858C"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidPeriod.ExceedDays | The period between specified EndTime and StartTime exceeds %s days. | |
| 400 | Invalid%s.Format | The specified %s format is invalid. | |
| 400 | AccountDisabled | Your account is not enabled. | |
| 400 | FileNotExist | The specified file does not exist. | |
| 400 | IncorrectPassword | The password is incorrect. | |
| 400 | NotApnsCertificate | The Certificate is not an APNs certificate. | |
| 400 | PermissionDenied | The specified AppKey is not authorized. | |
| 400 | SendSpeedNotSupported | SendSpeed is not supported for specified Target. | |
| 400 | SmsProfileConfigFailed | Failed to configure SMS profile. | |
| 400 | SmsProfileGetFailed | Failed to get SMS profile. | |
| 400 | SmsRoleAuthorizeFailed | Failed to authorize SMS role. | |
| 400 | SmsRoleUnauthorized | The SMS role is unauthorized. | |
| 400 | TagsNumberBeyondLimit | The number of tags bound to this app exceeds the limit. | |
| 400 | Invalid%s.LengthExceed | The specified %s length cannot be greater than %s. | |
| 400 | Invalid%s.BytesExceed | The specified %s exceeds the %s bytes limit. | |
| 400 | Invalid%s.Empty | The specified %s cannot be empty. | |
| 400 | Invalid.Parameter | The specified parameter is invalid: %s. | |
| 400 | TargetNotSupported | Target is not supported for batch push. | |
| 500 | InternalError | The request processing has failed due to some unknown error. Please try again. If the error still exists, submit a ticket. | The request processing has failed due to some unknown error. |
| 500 | Timeout | The request processing is timeout. | Request processing timed out. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.