Push

更新时间:
复制 MD 格式

This advanced push API sends notifications or messages to various devices. It provides a rich set of custom parameters to implement push behaviors for various scenarios.

Operation description

Before you use this API, make sure you understand the billing methods and pricing of EMAS Mobile Push.

This API supports pushes to Android, iOS, and HarmonyOS devices. For each platform, you must provide the corresponding 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:Push

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AppKey

integer

Yes

The AppKey.

23267207

PushType

string

Yes

The push type. Valid values:

  • NOTICE: A notification. Notifications are sent to devices through vendor channels, such as APNs, Huawei, Xiaomi, and HarmonyOS, and appear directly in the device's notification bar. When an Android device is online (the app process is active), the notification is preferentially sent through Alibaba Cloud's proprietary channel. The Push software development kit (SDK) then constructs and displays the notification. This improves push performance and can save on vendor channel message quotas in some scenarios.

  • MESSAGE: A message. Messages are sent through Alibaba Cloud's proprietary online channel. They do not appear in the notification bar by default. Instead, the app must be active to receive and process them. Your business logic determines whether to trigger any actions. If a device is offline (the app process is inactive), it cannot receive messages immediately. In this case, use the `iOSRemind` or `AndroidRemind` parameter to convert the message into a notification. Alternatively, set the `StoreOffline` parameter to have the push system save the message. The system then delivers the message automatically when the device comes back online.

MESSAGE

DeviceType

string

Yes

The device type. Valid values:

  • HARMONY: A HarmonyOS device.

  • iOS: An iOS device.

  • ANDROID: An Android device.

  • ALL: For older dual-platform apps, this sends pushes to both Android and iOS devices. For newer single-platform apps, this has the same effect as specifying the device type for that app.

Valid values:

  • ALL :

    ALL

  • ANDROID :

    ANDROID

  • iOS :

    iOS

HARMONY

Target

string

Yes

The push target. Valid values:

  • DEVICE: Push to devices.

  • ACCOUNT: Push to accounts.

  • ALIAS: Push to aliases.

  • TAG: Push to tags.

  • ALL: Push to all devices. The interval between two consecutive pushes to all devices of the same `DeviceType` must be at least 1 second.

Note

When pushing to all iOS devices, the push is sent to devices that have been active in the last 24 months and have not uninstalled the app. A push is considered delivered once the Apple Push Notification service (APNs) receives the request and does not return an error. This can cause a sharp increase in the number of active devices and lead to significant costs. Use this feature with caution.

  • TBD: Initializes a continuous push. The target is specified by a subsequent call to the ContinuouslyPush API.

ALL

TargetValue

string

Yes

Set this based on the `Target` type. Use commas to separate multiple values. If you exceed the limit, send multiple pushes.

  • If `Target` is `DEVICE`, provide device IDs, such as `deviceid1,deviceid2`. You can specify up to 1,000 device IDs.

  • If `Target` is `ACCOUNT`, provide account IDs, such as `account1,account2`. You can specify up to 1,000 account IDs.

  • If `Target` is `ALIAS`, provide aliases, such as `alias1,alias2`. You can specify up to 1,000 aliases.

  • If `Target` is `TAG`, you can use single or multiple tags. For more information about the format, see Tag format.

  • If `Target` is `ALL`, set the value to ALL. This is a fixed parameter combination for pushing to all devices.

  • If `Target` is `TBD`, set the value to TBD. This is a fixed parameter combination for continuous pushes.

ALL

StoreOffline

boolean

No

Specifies whether to save offline messages and notifications. The default value is false.

If set to true, and a user is offline, the message is sent again when the user comes online before the `ExpireTime`. The default `ExpireTime` is 72 hours. iOS notifications are sent through APNs and are not affected by this parameter.

false

SendChannels

string

No

Specifies the sending channels. Valid values:

  • accs: Alibaba Cloud's proprietary channel

  • huawei: Huawei channel

  • honor: Honor channel

  • xiaomi: Xiaomi channel

  • oppo: OPPO channel

  • vivo: vivo channel

  • meizu: Meizu channel

  • gcm: Google GCM channel (legacy HTTP)

  • fcm: Google Firebase channel (HTTP v1 API)

  • apns: APNs channel

  • harmony: HarmonyOS channel

Note
  • If you do not set this parameter, all channels can be used.

  • If you set this parameter, only the specified channels are used.

  • If the specified channels conflict with the sending policy, the push is not sent. For example, if an iOS notification can only be sent through the APNs channel, but `apns` is not included in this parameter, the push will fail.

  • If you specify `gcm`, pushes can be sent through both Google GCM and FCM channels. If you specify `fcm`, pushes can only be sent through the Google FCM channel.

accs,huawei,xiaomi

PushTime

string

No

Used for scheduled sending. If you do not set this parameter, the push is sent immediately. The scheduled time can be no more than 7 days in the future.

The time must be in ISO 8601 format and in UTC: `YYYY-MM-DDThh:mm:ssZ`.

Note

Scheduled sending is not supported when `Target` is `TBD` (continuous push).

2019-02-20T00:00:00Z

ExpireTime

string

No

The expiration time for offline messages or notifications. Use this with `StoreOffline`. The message is not sent after this time. The maximum retention period is 72 hours, which is also the default.

The time must be in ISO 8601 format and in UTC: `YYYY-MM-DDThh:mm:ssZ`. The expiration time must be at least 3 seconds after the current time or the scheduled push time (`ExpireTime` > `PushTime` + 3 seconds). The 3-second buffer accounts for network and system delays. For single pushes, use a value of at least 1 minute. For batch pushes or pushes to all devices, use a value of at least 10 minutes.

2019-02-20T00:00:00Z

JobKey

string

No

A custom ID for the push task. If `JobKey` is not empty, this field is included in the receipt logs. For more information about receipt logs, see Receipt logs.

Note

The format must consist of letters, numbers, underscores (_), or hyphens (-). The length cannot exceed 32 characters.

123

Title

string

No

The title of the notification or message. The maximum length is 200 bytes.

This is required for pushes to Android and HarmonyOS. It is optional for iOS notifications. If you provide a title for an iOS notification:

  • For iOS 10 and later, the notification displays the title.

  • For iOS 8.2 to iOS 9.x, the title replaces the app name in the notification.

title

Body

string

No

The content of the notification or message for Android and HarmonyOS pushes. The content of the message or notification for iOS. The size of the push content is limited. For more information, see Product limits.

hello

Trim

boolean

No

Specifies whether to automatically truncate titles and content that are too long.

Note

This only applies to vendor channels that have explicit limits on title and content length. It does not apply to channels like APNs, Huawei, and Honor, which only limit the total request body size.

false

iOSApnsEnv

string

No

iOS notifications are sent through APNs. Specify the environment.

  • DEV: The development environment. Use this for apps installed and debugged directly from Xcode.

  • PRODUCT: The production environment. Use this for apps distributed through the App Store, TestFlight, Ad Hoc, or enterprise distribution.

Valid values:

  • DEV :

    DEV

  • PRODUCT :

    PRODUCT

DEV

iOSRemind

boolean

No

If a device is offline when a message is pushed (meaning the persistent connection to the Mobile Push server is down), the push is sent once as a notification through Apple's APNs channel.

Note

Converting offline messages to notifications is only supported in the production environment.

true

iOSSubtitle

string

No

The subtitle of the iOS notification (iOS 10+).

su'b

iOSRemindBody

string

No

The content of the iOS notification used when a message is converted to a notification. This is valid only when `iOSApnsEnv` is `PRODUCT` and `iOSRemind` is `true`.

ios通知body

iOSMusic

string

No

The sound for an iOS notification. Specify the name of an audio file located in the app bundle or the `Library/Sounds` directory of the sandbox. For more information, see How to set notification sounds for iOS pushes.

If you specify an empty string (""), the notification is silent. If you do not set this parameter, the default system sound is used.

""

iOSBadge

integer

No

The badge number on the top-right corner of the app icon on iOS.

Note

If `iOSBadgeAutoIncrement` is set to `true`, this parameter must be empty.

0

iOSBadgeAutoIncrement

boolean

No

Specifies whether to enable the auto-increment feature for the badge number. The default value is `false`.

Note

When this is `true`, `iOSBadge` must be empty.

The auto-increment feature is managed by the push server, which maintains a badge count for each device. This requires SDK version 1.9.5 or later. The user must also actively sync the badge number to the server.

true

iOSSilentNotification

boolean

No

Specifies whether to enable iOS silent notifications.

true

iOSMutableContent

boolean

No

The flag for the iOS notification content extension (iOS 10+). If set to `true`, an APNs notification can be processed by the extension before it is displayed. This must be set to `true` for silent notifications.

true

iOSNotificationCategory

string

No

Specifies the iOS notification category (iOS 10+).

ios

iOSNotificationCollapseId

string

No

If a device receives multiple notifications with the same `CollapseId`, they are merged into a single notification. If the device is offline and receives consecutive notifications with the same `CollapseId`, only one is shown in the notification bar. This parameter is supported on iOS 10 and later.

ZD2011

iOSNotificationThreadId

string

No

Groups iOS remote notifications using this property. It marks the identifier for the collapsed group. This is supported only on iOS 12.0 and later.

abc

iOSInterruptionLevel

string

No

The interruption level. Valid values:

  • passive: The system adds the notification to the notification list without lighting up the screen or playing a sound.

  • active: The system displays the notification immediately, lights up the screen, and can play a sound.

  • time-sensitive: The system presents the notification immediately, lights up the screen, and can play a sound, but it does not break through system notification controls.

  • critical: The system displays the notification immediately, lights up the screen, and plays a sound, bypassing the mute switch.

active

iOSRelevanceScore

number

No

The score for highlighting the summary. The value must be a floating-point number between 0 and 1.

0.01

iOSExtParameters

string

No

The extended properties of the iOS notification.

For iOS 10 and later, specify the resource URL for a rich push notification, such as `{"attachment": "https://xxxx.xxx/notification_pic.png"}`. This parameter must be in JSON map format to avoid parsing errors.

{"attachment": "https://xxxx.xxx/notification_pic.png"}

iOSLiveActivityEvent

string

No

Starts, updates, or ends a Live Activity.

  • Enumeration: start | update | end

start

iOSLiveActivityId

string

No

The Live Activity ID reported by the device to your server. This is the unique identifier for the Live Activity.

66B94673-B32E-4CA7-863C-3E523054FD46

iOSLiveActivityAttributesType

string

No

The type of Live Activity to start.

Note

This is required when `iOSLiveActivityEvent` is `start`.

OrderActivityAttributes

iOSLiveActivityAttributes

string

No

A JSON string containing static pass-through parameters for Dynamic Island pushes. It includes static, custom user information, such as product numbers and order details.

Note

This is required when `iOSLiveActivityEvent` is `start`.

{"orderId": "12345", "product": "Shoes"}

iOSLiveActivityContentState

string

No

Dynamic pass-through parameters for Dynamic Island pushes. It includes real-time updates, such as price or inventory changes.

{"status": "delivered", "estimatedArrival": "2023-12-31T12:00:00Z"}

iOSLiveActivityDismissalDate

integer

No

A UNIX timestamp in seconds. The ended Live Activity remains on the lock screen until this specified time. The maximum duration is 4 hours.

1743131967

iOSLiveActivityStaleDate

integer

No

A UNIX timestamp in seconds. Marks the time when the activity's content becomes outdated.

1743131967

AndroidNotifyType

string

No

The notification alert type. Valid values:

  • VIBRATE: Vibrate (default)

  • SOUND: Sound

  • BOTH: Sound and vibrate

  • NONE: Silent

BOTH

AndroidRemind

boolean

No

If the device is offline when a message is pushed, this push uses the auxiliary pop-up feature. The default value is `false`. This is effective only when `PushType` is `MESSAGE`.

If the message is successfully converted to a notification, the data displayed in the notification is the value of the `AndroidPopupTitle` and `AndroidPopupBody` parameters set on the server. When the notification is tapped, the data obtained in the `onSysNoticeOpened` method of the auxiliary pop-up is the value of the `Title` and `Body` parameters set on the server.

true

AndroidOpenType

string

No

The action to take after a notification is tapped. Valid values:

  • APPLICATION: Open the application (default).

  • ACTIVITY: Open a specific Android Activity.

  • URL: Open a URL.

  • NONE: No action.

APPLICATION

AndroidActivity

string

No

Specifies the activity to open when the notification is tapped.

This is required only when `AndroidOpenType` is `Activity`. For example: `com.alibaba.cloudpushdemo.bizactivity`.

com.alibaba.cloudpushdemo.bizactivity

AndroidOpenUrl

string

No

The URL to open after the Android device receives the push.

This is required only when `AndroidOpenType` is `URL`.

https://xxxx.xxx

AndroidPopupActivity

string

No

Specifies the Activity to launch after the notification is tapped.

com.alibaba.cloudpushdemo.bizactivity

AndroidPopupTitle

string

No

The title content in auxiliary pop-up mode. This parameter is required if `AndroidPopupActivity` is not empty.

Length limit: 50 characters. Both Chinese and English characters count as one.

If you use a vendor channel, comply with its restrictions. For more information, see Limits on pushes through auxiliary channels on Android.

hello

AndroidPopupBody

string

No

The body content in auxiliary pop-up mode. This parameter is required if `AndroidPopupActivity` is not empty.

Length limit: 200 characters. Both Chinese and English characters count as one.

If you use a vendor channel, comply with its restrictions. For more information, see Limits on pushes through auxiliary channels on Android.

hello

AndroidRenderStyle

integer

No

The notification style. Valid values:

  • 0: Standard mode (default)

  • 1: Long text mode (supported by Huawei, Honor, Xiaomi, OPPO, Meizu, and proprietary channels)

  • 2: Big picture mode (supported by proprietary channels, but not by Xiaomi models)

  • 3: List mode (supported by Huawei, Honor, Xiaomi, OPPO, and proprietary channels)

Note

This parameter is required if you use a non-standard mode.

Valid values:

  • 0 :

    0

  • 1 :

    1

  • 2 :

    2

1

AndroidBigTitle

string

No

The title in long text mode. Length limit: 200 bytes (1 Chinese character is counted as 3 bytes).

  • Currently, this is only supported by Honor channels and Huawei channels on EMUI 11 and later.

  • If this parameter is not provided in long text mode, the system uses the first non-empty value from `Title` or `AndroidPopupTitle`.

示例长标题

AndroidBigBody

string

No

The body in long text mode. Length limit: 1,000 bytes (1 Chinese character is counted as 3 bytes). The actual limit depends on the specific vendor channel.

Currently supported on:

  • Huawei: EMUI 10 and later

  • Honor: Magic UI 4.0 and later

  • Xiaomi: MIUI 10 and later

  • OPPO: ColorOS 5.0 and later

  • Meizu: Flyme

  • Proprietary channel: Android SDK 3.6.0 and later

Note

If this parameter is not provided in long text mode, the system uses the first non-empty value from `Body` or `AndroidPopupBody`.

示例长文本

AndroidBigPictureUrl

string

No

The image URL for big picture mode. Currently supported by the proprietary channel on Android SDK 3.6.0 and later.

https://imag.example.com/image.png

AndroidXiaomiBigPictureUrl deprecated

string

No

This parameter is deprecated. Starting from August 2023, Xiaomi no longer supports dynamically setting small icons, right-side icons, or large pictures during pushes on new devices/systems.

https://f6.market.xiaomi.com/download/MiPass/aaa/bbb.png

AndroidImageUrl

string

No

The URL for the right-side icon. Currently supported on:

  • Huawei EMUI (only in long text and inbox modes).

  • Honor Magic UI (only in long text mode).

  • Proprietary channel: Android SDK 3.5.0 and later.

https://imag.example.com/image.png

AndroidXiaomiImageUrl deprecated

string

No

This parameter is deprecated. Starting from August 2023, Xiaomi no longer supports dynamically setting small icons, right-side icons, or large pictures during pushes on new devices/systems.

https://imag.example.com/image.png

AndroidInboxBody

string

No

The body content for inbox mode. The content must be a valid JSON array with no more than 5 elements. Currently supported on:

  • Huawei: EMUI 9 and later

  • Honor: Magic UI 4.0 and later

  • Xiaomi: MIUI 10 and later

  • OPPO: ColorOS 5.0 and later

  • Proprietary channel: Android SDK 3.6.0 and later

["第一行","第二行"]

AndroidNotificationBarType

integer

No

The custom Android notification bar style. Valid values: 1 to 100.

2

AndroidNotificationBarPriority

integer

No

The priority for arranging the Android notification in the notification bar. Valid values: -2, -1, 0, 1, 2.

0

AndroidNotificationNotifyId

integer

No

A unique identifier for each message when it is displayed as a notification. Different notifications can have the same `NotifyId`, which allows a new notification to overwrite an old one.

100001

AndroidNotificationChannel

string

No

The `channelId` for the Android app. This must correspond to a `channelId` in the app.

  • Set the `NotificationChannel` parameter. For more information about its usage, see FAQ: Why are notifications not received on devices running Android 8.0 or later?.

  • Because the `channel_id` for the OPPO private message channel is the same as the app's `channelId`, this value is used for pushes through the OPPO channel.

  • This value is used for pushes through Huawei, FCM, and Alibaba Cloud's proprietary channels.

1

AndroidNotificationHuaweiChannel

string

No

Sets the `importance` parameter for Huawei notification message classification. This determines the notification behavior on the user's device. Valid values:

  • LOW: For informational and marketing messages.

  • NORMAL: For service and communication messages.

Note
  • For the Huawei channel, use `AndroidMessageHuaweiCategory` for notification classification. You may no longer need to use `AndroidNotificationHuaweiChannel`.

  • Apply for this on the Huawei platform. Application link.

Valid values:

  • LOW :

    LOW

  • NORMAL :

    NORMAL

LOW

AndroidNotificationHonorChannel

string

No

Sets the `importance` parameter for Honor notification message classification. This determines the notification behavior on the user's device. Valid values:

  • LOW: For informational and marketing messages.

  • NORMAL: For service and communication messages.

Apply for this on the Honor platform. Application link.

Valid values:

  • LOW :

    LOW

  • NORMAL :

    NORMAL

LOW

AndroidNotificationXiaomiChannel

string

No

Sets the `channelId` for the Xiaomi notification type. Apply for this on the Xiaomi platform. For more information, see Application link.

Note
  • A single app can apply for a maximum of 8 channels through the Xiaomi channel. Plan accordingly.

michannel

AndroidNotificationVivoChannel

string

No

Sets the classification for vivo notification messages. Valid values:

  • 0: Operational messages (default)

  • 1: System messages

Note
  • For the vivo channel, use `AndroidMessageVivoCategory` for notification classification. You may no longer need to use `AndroidNotificationVivoChannel`.

  • Apply for this on the vivo platform. For more information, see Application link.

Valid values:

  • 0 :

    0

  • 1 :

    1

classification

AndroidNotificationGroup

string

No

Message grouping. For messages in the same group, the notification bar shows only the latest message and the total number of messages received for that group. It does not display all messages and cannot be expanded. Currently supported on:

  • Huawei vendor channel

  • Honor vendor channel

  • Proprietary channel for Android SDK 3.9.1 and earlier

Note

This parameter is no longer supported by the proprietary channel for Android SDK 3.9.2 and later.

group-1

AndroidNotificationThreadId

string

No

Message grouping. Messages in the same group are displayed in a collapsed state in the notification bar and can be expanded. Notifications from different groups are displayed separately. Currently supported on:

  • Proprietary channel for Android SDK 3.9.2 and later

thread-1

AndroidExtParameters

string

No

Sets the extended properties of the notification. This property is not effective when `PushType` is `MESSAGE`.

This parameter must be in JSON map format to avoid parsing errors.

{"key1":"value1","api_name":"PushNoticeToAndroidRequest"}

AndroidMessageHuaweiUrgency

string

No

The delivery priority for notifications on the Huawei channel. Valid values:

  • HIGH

  • NORMAL

Apply for permission. For more information, see Application link.

Valid values:

  • HIGH :

    HIGH

  • NORMAL :

    NORMAL

HIGH

AndroidMessageHuaweiCategory

string

No

Function 1: After applying for self-classification rights, this is used to identify the message type and determine the message alert method. It accelerates the sending of specific message types. For valid values, refer to the message classification standards in the official Huawei Push documentation. Fill in the 'Cloud notification category value' or 'Local notification category value' from the document's table.

Function 2: After applying for special permissions, this is used to identify high-priority pass-through scenarios. Valid values:

  • VOIP: Voice and video calls

  • PLAY_VOICE: Voice playback

Note

If the 'Cloud notification category value' is 'Not applicable', the push is sent through Alibaba Cloud's proprietary channel. If the 'Local notification category value' is 'Not applicable', the push is sent through the Huawei channel.

VOIP

AndroidMessageOppoCategory

string

No

OPPO classifies and manages messages in two categories: Communication & Service, and Content & Marketing.

Communication & Service (requires permission):

  • IM: Instant messaging, audio, and video calls

  • ACCOUNT: Personal account and asset changes

  • DEVICE_REMINDER: Personal device reminders

  • ORDER: Personal order/logistics status changes

  • TODO: Personal schedule/to-do items

  • SUBSCRIPTION: Personal subscriptions

Content & Marketing:

  • NEWS: News and information

  • CONTENT: Content recommendations

  • MARKETING: Platform activities

  • SOCIAL: Social updates

For more information, see OPUSH Message Classification Rules.

MARKETING

AndroidMessageOppoNotifyLevel

integer

No

The alert level for notification bar messages on the OPPO channel. Valid values:

  • 1: Notification bar

  • 2: Notification bar, lock screen, ringtone, vibration (default level for Communication & Service messages)

  • 16: Notification bar, lock screen, ringtone, vibration, banner (requires permission)

Note

When using the `AndroidMessageOppoNotifyLevel` parameter, you must also pass the `AndroidMessageOppoCategory` parameter.

1

AndroidMessageVivoCategory

string

No

vivo classifies and manages messages in two categories: System messages and Operational messages. System messages:

  • IM: Instant messages

  • ACCOUNT: Account and assets

  • TODO: Schedule and to-do

  • DEVICE_REMINDER: Device information

  • ORDER: Orders and logistics

  • SUBSCRIPTION: Subscription reminders

Operational messages:

  • NEWS: News

  • CONTENT: Content recommendations

  • MARKETING: Operational activities

  • SOCIAL: Social updates

For more information, see Classification description.

TODO

AndroidTargetUserType

integer

No

Sets the vendor channel notification type:

  • 0: Formal notification (default).

  • 1: Test notification.

Note
  • Configuring this parameter is equivalent to configuring `AndroidHuaweiTargetUserType`, `AndroidHonorTargetUserType`, `AndroidVivoPushMode`, and `AndroidOppoIntentEnv` simultaneously. Specific vendor channel parameters can override this setting.

  • Currently supported by: Huawei channel, Honor channel, vivo channel, and OPPO Fluid Cloud.

0

AndroidHuaweiTargetUserType

integer

No

Sets the Huawei channel notification type:

  • 0: Formal notification (default).

  • 1: Test notification.

Note

Each app can send 500 test notifications per day. These are not subject to the daily push limit per device.

Valid values:

  • 0 :

    0

  • 1 :

    1

0

AndroidHonorTargetUserType

integer

No

Sets the Honor channel notification type:

  • 0: Formal notification (default).

  • 1: Test notification.

Note

Each app can send 1,000 test notifications per day. These are not subject to the daily push limit per device.

0

AndroidVivoPushMode

integer

No

Sets the vivo channel notification type:

  • 0: Formal push (default).

  • 1: Test push.

Note

For test pushes, configure test devices in the vivo console beforehand. Find the test device's `RegId` by searching for "onReceiveRegId regId" in the device startup logs.

Valid values:

  • 0 :

    0

  • 1 :

    1

0

AndroidOppoIntentEnv

integer

No

Sets the OPPO Fluid Cloud push environment.

  • 0: Production environment (default).

  • 1: Staging environment.

Note

The OPPO Fluid Cloud staging environment must be set up on the client side. For more information, see Environment setup.

1

AndroidHuaweiBusinessType

integer

No

Sets the Huawei quick notification parameter.

  • 0: Send a standard Huawei notification (default).

  • 1: Send a Huawei quick notification.

1

AndroidHuaweiReceiptId

string

No

The receipt ID for the Huawei channel. You can find this ID in the receipt parameter configuration on the Huawei Push service platform.

Note

If the default receipt configuration on the Huawei Push service platform is the Alibaba Cloud receipt, do not provide this. If not, first configure the default Huawei channel receipt ID in the Alibaba Cloud EMAS Mobile Push console.

RCP4C123456

AndroidVivoReceiptId

string

No

The receipt ID for the vivo channel. You can find this ID in the application information section of the vivo open platform's push service.

Note

If the default receipt configuration on the vivo open platform is the Alibaba Cloud receipt, do not provide this. If not, first configure the default vivo channel receipt ID in the Alibaba Cloud EMAS Mobile Push console.

123

AndroidBadgeClass

string

No

The fully qualified class name of the app's entry Activity for badge setting.

Note

This is effective only for pushes through Huawei/Honor vendor channels.

com.alibaba.cloudpushdemo.bizactivity

AndroidBadgeAddNum

integer

No

Sets the value to add to the badge number. This value is added to the original badge number. The value must be between 1 and 99.

Note

This is effective only for pushes through Huawei/Honor vendor channels. If both `AndroidBadgeAddNum` and `AndroidBadgeSetNum` are present, `AndroidBadgeSetNum` takes precedence.

1

AndroidBadgeSetNum

integer

No

Sets a fixed number for the badge. The value must be between 0 and 99.

Note

For vendor channel pushes, this is effective only for Huawei and Honor channels. For pushes through Alibaba Cloud's proprietary channel, this is effective only on Huawei, Honor, and vivo models.

5

AndroidMusic

string

No

The notification sound for the Huawei vendor channel. Specify the name of the audio file located in the `app/src/main/res/raw/` directory of the client project. Do not include the file format suffix.

If this is not set, the default ringtone is used.

alicloud_notification_sound

HarmonyRemind

boolean

No

If the device is offline when a message is pushed, this push uses the auxiliary pop-up feature. The default value is `false`. This is effective only when `PushType` is `MESSAGE`.

If the message is successfully converted to a notification, the data displayed in the notification is the value of the `HarmonyRemindTitle` and `HarmonyRemindBody` parameters set on the server.

false

HarmonyRemindTitle

string

No

The HarmonyOS notification title used when a message is converted to a notification. This is effective only when `HarmonyRemind` is `true`.

新消息

HarmonyRemindBody

string

No

The HarmonyOS notification content used when a message is converted to a notification. This is effective only when `HarmonyRemind` is `true`.

您有一条新消息,请查收

HarmonyCategory

string

No

The notification message category. After you apply for notification message self-classification rights, this is used to identify the message type. Different notification message types affect how messages are displayed and alerted. Valid values:

  • IM: Instant messaging

  • VOIP: Voice and video calls

  • SUBSCRIPTION: Subscriptions

  • TRAVEL: Travel

  • HEALTH: Health

  • WORK: Work reminders

  • ACCOUNT: Account updates

  • EXPRESS: Orders & logistics

  • FINANCE: Finance

  • DEVICE_REMINDER: Device reminders

  • MAIL: Mail

  • CUSTOMER_SERVICE: Customer service messages

  • MARKETING: News, content recommendations, social updates, product promotions, financial updates, lifestyle information, surveys, feature recommendations, and operational activities. This only identifies the content and does not speed up message delivery. These are collectively known as informational and marketing messages.

For more information, see Notification.category in the HarmonyOS documentation.

IM

HarmonyNotificationSlotType

string

No

Uses the specified type of notification channel. This is effective only when the Alibaba Cloud proprietary channel is online.

  • SOCIAL_COMMUNICATION: Social communication.

  • SERVICE_INFORMATION: Service reminders.

  • CONTENT_INFORMATION: Content information.

  • CUSTOMER_SERVICE: Customer service messages. This type is for messages between users and businesses and must be initiated by the user.

  • OTHER_TYPES: Others.

For more information, see SlotType in the HarmonyOS documentation.

SOCIAL_COMMUNICATION

HarmonyNotifyId

integer

No

A unique identifier for each message when it is displayed as a notification. If not provided, the push service automatically generates a unique ID for each message. Different notifications can have the same `notifyId`, which allows a new message to overwrite an old one.

For more information, see Notification.notifyId in the HarmonyOS documentation.

0

HarmonyActionType

string

No

The action to take after a notification is tapped. Valid values:

  • APP_HOME_PAGE: Open the app's home page.

  • APP_CUSTOM_PAGE: Open a custom page in the app.

APP_HOME_PAGE

HarmonyAction

string

No

The action corresponding to the in-app page ability.

Important When `HarmonyActionType` is `APP_CUSTOM_PAGE`, fill in at least one of `HarmonyUri` or `HarmonyAction`.

For more information, see ClickAction.action in the HarmonyOS documentation.

com.example.action

HarmonyUri

string

No

The URI corresponding to the in-app page ability.

Important When `HarmonyActionType` is `APP_CUSTOM_PAGE`, fill in at least one of `HarmonyUri` or `HarmonyAction`. If there are multiple abilities, fill in the action and URI for each. The action is used with priority to find the corresponding in-app page.

For more information, see ClickAction.uri in the HarmonyOS documentation.

https://www.example.com:8080/push/example

HarmonyRenderStyle

string

No

The notification message style:

  • NORMAL: Normal notification (default)

  • MULTI_LINE: Multi-line text style

NORMAL

HarmonyImageUrl

string

No

The URL for the large icon on the right of the notification. The URL must use the HTTPS protocol.

Note

Supported image formats are PNG, JPG, JPEG, HEIF, GIF, and BMP. The image dimensions (height × width) must be less than 25,000 pixels.

For more information, see Notification.image in the HarmonyOS documentation.

https://example.com/xxx.png

HarmonyInboxContent

string

No

The content for the multi-line text style. This field is required when `HarmonyRenderStyle` is `MULTI_LINE`. It supports up to 3 lines of content.

["1.content1","2.content2","3.content3"]

HarmonyExtParameters

string

No

Sets the extended properties of the notification. This property is not effective when `PushType` is `MESSAGE`.

This parameter must be in JSON map format to avoid parsing errors.

{"key1":"value1","api_name":"PushNoticeToAndroidRequest"}

HarmonyTestMessage

boolean

No

Test message flag:

  • false: Normal message (default)

  • true: Test message

For more information, see pushOptions.testMessage in the HarmonyOS documentation.

true

HarmonyReceiptId

string

No

The receipt ID for the HarmonyOS channel. You can find this ID in the receipt parameter configuration on the HarmonyOS Push service platform.

Note

If the default receipt configuration on the HarmonyOS Push service platform is the Alibaba Cloud receipt, do not provide this. If not, first configure the default HarmonyOS channel receipt ID in the Alibaba Cloud EMAS Mobile Push console.

For more information, see pushOptions.receiptId in the HarmonyOS documentation.

RCPB***DFD5

HarmonyExtensionPush

boolean

No

When `PushType` is `NOTICE`, specifies whether this is a HarmonyOS extended notification message.

  • true: Send an extended notification message.

  • false: Send a normal notification (default).

Apply for permission on the HarmonyOS side before you can send extended notification messages. For more information, see Send Extended Notification Messages in the HarmonyOS documentation.
Supported starting from HarmonyOS SDK version 1.2.0.

true

HarmonyExtensionExtraData

string

No

The extra data for the extended notification message.
This is effective when sending a HarmonyOS extended notification message.
Conceptually, this is equivalent to the `extraData` field of a HarmonyOS extended notification message. For the specific definition, see HarmonyOS ExtensionPayload Description.
Supported starting from HarmonyOS SDK version 1.2.0.


示例额外数据

HarmonyBadgeAddNum

integer

No

The number to add to the HarmonyOS app badge. See the description of the HarmonyOS badge addNum field.
Supported starting from HarmonyOS SDK version 1.2.0.

1

HarmonyBadgeSetNum

integer

No

The number to set for the HarmonyOS app badge. See the description of the HarmonyOS badge setNum field. Supported starting from HarmonyOS SDK version 1.2.0.

1

SmsTemplateName

string

No

The name of the SMS template for supplementary sending. Get this from the SMS template management interface. This is the system-assigned name, not the name set by the developer.

短信模板名称

SmsSignName

string

No

The signature for the supplementary text message.

短信签名

SmsParams

string

No

The key-value pairs for the variables in the SMS template. Format: key1=value1&key2=value2.

key1=value1

SmsDelaySecs

integer

No

The delay time in seconds before triggering the text message.

This must be set if using SMS filter interaction. Set it to 15 seconds or more, with a maximum of 3 days, to avoid duplicate pushes and text messages.

Note

When using SMS filter interaction, the `ExpireTime` parameter is invalid. The notification expiration time is calculated based on the `SmsDelaySecs` parameter. The expiration time is the current time plus the `SmsDelaySecs` time.

15

SmsSendPolicy

integer

No

The condition for triggering the text message. Valid values:

  • 0: Triggered when the push is not received.

  • 1: Triggered when the user does not open the push.

Valid values:

  • 0 :

    0

  • 1 :

    1

0

SendSpeed deprecated

integer

No

This parameter is deprecated.

0

AndroidXiaoMiNotifyTitle deprecated

string

No

This parameter is deprecated. All third-party auxiliary pop-ups are now supported by the new parameter AndroidPopupTitle.

AndroidXiaoMiNotifyBody deprecated

string

No

This parameter is deprecated. All third-party auxiliary pop-ups are now supported by the new parameter AndroidPopupBody.

AndroidXiaoMiActivity deprecated

string

No

This parameter is deprecated. All third-party auxiliary pop-ups are now supported by the new parameter AndroidPopupActivity.

IdempotentToken

string

No

An idempotent parameter to prevent duplicate pushes caused by API call retries. If you make a call with the same `IdempotentToken` within 15 minutes, only one push is sent. Subsequent calls return the result of the first successful push.

Note
  • The parameter must be a standard 36-character UUID (8-4-4-4-12). Each valid character must be a hexadecimal digit from 0-9 or a-f, case-insensitive.

  • This parameter only prevents duplicate pushes from retries. It cannot prevent duplicate pushes from concurrent calls.

c8016d13-6e76-410c-9bda-769383d11787

AndroidMeizuNoticeMsgType

integer

No

Meizu message type

  • 0 Public message (default)

  • 1 Private message

Valid values:

  • 0 :

    Public message (default)

  • 1 :

    Private message

0

AndroidOppoPrivateMsgTemplateId

string

No

OPPO private message template ID

687557242b1634hzefs3d5013

AndroidOppoPrivateTitleParameters

object

No

OPPO private message template title parameters

string

No

The variable name and value in the OPPO private message template title.

my_title

AndroidOppoPrivateContentParameters

object

No

OPPO private message template content parameters

string

No

The variable name and value in the OPPO private message template content.

my_content

HarmonyLiveViewPayload

string

No

A JSON string of the HarmonyOS Live Window data structure LiveViewPayload. For development and integration, see HarmonyOS Live Window Push Guide.

{ "activityId": 1, "operation": 0, "event": "TAXI", "status": "DRIVER_ON_THE_WAY", "activityData": { "notificationData": { "type": 3 } } }

AndroidHuaweiLiveNotificationPayload

string

No

A JSON string of the Huawei Android Live Notification data structure LiveNotificationPayload. For development and integration, see Huawei Live Notification Push Guide.

{ "activityId": 1, "operation": 1, "event": "TAXI", "activityData": { "notificationData": { "type": 3 } } }

AndroidOppoIntelligentIntent

string

No

A JSON string of the OPPO Fluid Cloud intent sharing data structure IntelligentIntent. For development and integration, see OPPO Fluid Cloud Push Guide.

{ "intentName": "Example.Progress", "identifier": "d71ebd3119877b12ecdb6c4fe96b068e", "timestamp": 1729485000989, "serviceId": { "launcher": "999800001", "fluidCloud": "999900001" }, "intentAction": { "actionStatus": 0 }, "intentEntity": { "entityName": "TAXI" } }

AndroidOppoDeleteIntentData

string

No

A JSON string of the OPPO Fluid Cloud intent deletion data structure data. This parameter is invalid if the `AndroidOppoIntelligentIntent` parameter is filled. For development and integration, see OPPO Fluid Cloud Push Guide.

{ "intentName": "Example.Progress", "entityIds": [ "A580202509130712" ], "serviceId": { "launcher": "999800001", "fluidCloud": "999900001" } }

AndroidVivoLiveMessage

string

No

A JSON string of the vivo Atomic Island data structure liveMessage. For development and integration, see vivo Atomic Island Push Guide.

{ "operation": 0, "scene": "HEALTH_REGISTER", "templateType": 1, "showNotify": true, "changeRecord": 999, "capsuleData": { "bgColor": "#32d4d4" } }

AndroidXiaomiFocusParam

string

No

A JSON string of the Xiaomi Super Island data structure miui.focus.param. For development and integration, see Xiaomi Super Island Push Guide.

{ "param_v2": { "business": "taxi", "updatable": true, "orderId": "A580202509130712", "param_island": { "islandProperty": 1, "bigIslandArea": { "imageTextInfoLeft": { "type": 1 } } } } }

AndroidXiaomiFocusPics

string

No

A JSON string of the Xiaomi Super Island data images miui.focus.pic_xxx. For development and integration, see Xiaomi Super Island Push Guide.

{ "miui.focus.pic_ticker": "https://example.com/ticker.jpg", "miui.focus.pic_aod": "https://example.com/aod.jpg", "miui.focus.pic_imageText": "https://example.com/imageText.jpg" }

Additional information about request parameters

Details about Title/Body:

Property\Push TypeMessage (iOS)Message (Android)Notification (iOS)Notification (Android)
TitleMessage title, corresponding to the `title` field of `CCPSysMessage` in the message callback.The `CPushMessage.title` field.Notification titleNotification title, in the `onNotificationOpened` callback method.
BodyMessage body, corresponding to the `body` field of `CCPSysMessage` in the message callback.Message body, the `CPushMessage.content` field.Notification contentNotification content, in the `onNotificationOpened` callback method.

The following configurations apply only to the Android auxiliary pop-up feature:

If a device is offline when a push is sent (that is, the persistent connection to the Mobile Push server is down), this push can activate the auxiliary pop-up feature. To activate this feature, see Configure auxiliary channels for Mobile Push. The following conditions must be met:

  • A third-party auxiliary channel is integrated.

  • The `StoreOffline` parameter is set to `true`.

  • A notification is sent (the `AndroidRemind` parameter is not required), or a message is sent and the `AndroidRemind` parameter is set to `true`.

  • The `AndroidPopupActivity`, `AndroidPopupTitle`, and `AndroidPopupBody` parameters are set correctly.

Response elements

Element

Type

Description

Example

object

MessageId

string

The ID of the message for a push.

501029

RequestId

string

The request ID.

9998B3CC-ED9E-4CB3-A8FB-DCC61296BFBC

Examples

Success response

JSON format

{
  "MessageId": "501029",
  "RequestId": "9998B3CC-ED9E-4CB3-A8FB-DCC61296BFBC"
}

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.