PushV2

更新时间:
复制 MD 格式

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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
  • Format the token as a standard 36-character UUID (8-4-4-4-12). Valid characters are hexadecimal digits 0–9 and a–f. Case-insensitive.

  • This parameter prevents duplicates only from retries. It does not prevent duplicates from concurrent calls.

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.