Push

更新时间:
复制 MD 格式

Advanced Push API that pushes notifications or messages to different device endpoints. This API provides rich push customization parameters to implement push behavior in different scenarios.

Operation description

Please ensure that you have fully understood the billing methods and pricing of the EMAS Mobile Push product before using this API.

This API differentiates between Android, iOS, and HarmonyOS platforms. For push calls on different platforms, you need to pass the corresponding platform's 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 Resources

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AppKey

integer

Yes

AppKey information.

23267207

PushType

string

Yes

Push type. Valid values:

  • NOTICE: Notification. Notifications are delivered to devices through vendor channels such as APNs, Huawei, Xiaomi, and HarmonyOS, and are displayed directly in the device notification bar. When an Android device is online (app process is alive), the notification is preferentially delivered through the Alibaba Cloud proprietary channel, where the Push SDK constructs and displays the notification, providing better push performance and potentially saving vendor push message quotas in some scenarios.

  • MESSAGE: Message. Messages are delivered through the Alibaba Cloud proprietary online channel. They are not displayed in the notification bar by default, but need to be received and processed by the app when the process is active, allowing the business to decide whether to trigger certain business behaviors. When the device is offline (app process is inactive), messages cannot be received in a timely manner. In this case, you can use the iOSRemind or AndroidRemind parameters below to convert messages to notifications when the device is offline; or set the StoreOffline parameter below so the push system saves the message when the device is offline and automatically delivers it when the device comes online.

MESSAGE

DeviceType

string

Yes

Device type. Valid values:

  • HARMONY: HarmonyOS device

  • iOS: iOS device

  • ANDROID: Android device

  • ALL: When the AppKey is for a legacy dual-platform application, this represents pushing to both Android and iOS devices simultaneously; when the AppKey is for a new single-platform application, the effect is the same as specifying the device type corresponding to the application type.

Valid values:

  • ALL :

    ALL

  • ANDROID :

    ANDROID

  • iOS :

    iOS

HARMONY

Target

string

Yes

Push target. Valid values:

  • DEVICE: Push by device.

  • ACCOUNT: Push by account.

  • ALIAS: Push by alias.

  • TAG: Push by tag.

  • ALL: Push to all devices (the interval between two full pushes of the same DeviceType must be at least 1 second).

Note

Pushing to all iOS devices will push to devices that have been active within the last 24 months but have not uninstalled the app. Once APNs (Apple Push Notification service) receives the push request without returning an error, it is considered delivered, which may cause a surge in active device counts and generate significant costs. Please use with discretion.

  • TBD: Initialize continuous push. The push target is specified by the subsequent ContinuouslyPush API.

ALL

TargetValue

string

Yes

Set based on the Target type. Multiple values are separated by commas. If the limit is exceeded, split into multiple pushes.

  • Target=DEVICE: Values such as deviceid1,deviceid2 (up to 1000).

  • Target=ACCOUNT: Values such as account1,account2 (up to 1000).

  • Target=ALIAS: Values such as alias1,alias2 (up to 1000).

  • Target=TAG: Supports single and multiple tags. For the format, see Tag Format.

  • Target=ALL: Value is ALL (fixed parameter for full push).

  • Target=TBD: Value is TBD (fixed parameter for continuous push).

ALL

StoreOffline

boolean

No

Whether to store offline messages/notifications. StoreOffline defaults to false.

If enabled, when the user is offline during push, the message will be resent when the user comes online within the expiration time (ExpireTime). ExpireTime defaults to 72 hours. iOS notifications go through the APNs channel and are not affected by StoreOffline.

false

SendChannels

string

No

Specify sending channels. Valid values:

  • accs: Alibaba Cloud 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 this parameter is not configured, all channels are available.

  • If this parameter is configured, only the specified channels are used.

  • If the configured channels conflict with the sending strategy (e.g., iOS notifications only go through the APNs channel, but this parameter does not include apns), the push will not be sent.

  • If gcm is configured, both Google GCM and FCM channels can be used. If fcm is configured, only the Google FCM channel can be used.

accs,huawei,xiaomi

PushTime

string

No

Used for scheduled sending. If not set, the default is immediate sending. Scheduled sending must be no later than 7 days from now.

The time format follows the ISO8601 standard and must use UTC time, in the format YYYY-MM-DDThh:mm:ssZ.

Note

When Target is TBD (continuous push), scheduled sending is not supported.

2019-02-20T00:00:00Z

ExpireTime

string

No

Expiration time for offline messages/notifications, used in conjunction with StoreOffline. Expired messages will no longer be sent. Maximum retention is 72 hours. Default is 72 hours.

The time format follows the ISO8601 standard and must use UTC time, in the format YYYY-MM-DDThh:mm:ssZ. The expiration time must be greater than the current time or the scheduled send time plus 3 seconds (ExpireTime > PushTime + 3 seconds). The 3-second buffer accounts for network and system delay tolerance. It is recommended to set at least 1 minute for single push, and at least 10 minutes for full push or batch push.

2019-02-20T00:00:00Z

JobKey

string

No

Custom identifier for the push task. When JobKey is not empty, the receipt log will include this field. For viewing receipt logs, see Receipt Logs.

Note

Format requirements: Only letters, digits, or the symbols '_' and '-' (any combination) are allowed, and the length must not exceed 32 characters.

123

Title

string

No

Title of the notification/message during push. Length limit: 200 bytes.

Required for Android and HarmonyOS push; optional for iOS notifications. If provided:

  • iOS 10+: Displayed as the notification title.

  • iOS 8.2 <= iOS version < iOS 10: Replaces the notification app name.

title

Body

string

No

Notification content/message content for Android and HarmonyOS push; iOS message/notification content. The push content size is limited. See Product Limits.

hello

Trim

boolean

No

Whether to automatically truncate overly long titles and content.

Note

Only applies to vendor channels that explicitly limit title and content length. Does not apply to APNs, Huawei, Honor, and other channels that do not limit title or content individually but only limit the total request body size.

false

iOSApnsEnv

string

No

iOS notifications are sent through the APNs center, and the corresponding environment information must be provided.

  • DEV: Development environment, applicable to apps installed and debugged directly via Xcode.

  • PRODUCT: Production environment, applicable to apps distributed via App Store, TestFlight, Ad Hoc, and enterprise distribution.

Valid values:

  • DEV :

    DEV

  • PRODUCT :

    PRODUCT

DEV

iOSRemind

boolean

No

When the device is offline during message push (i.e., the persistent connection to the push server is disconnected), this push will be delivered as a notification through Apple's APNs channel once.

Note

Offline message-to-notification conversion only applies to the production environment.

true

iOSSubtitle

string

No

iOS notification subtitle content (iOS 10+).

su'b

iOSRemindBody

string

No

iOS notification content used when converting iOS messages to notifications. Only valid when iOSApnsEnv=PRODUCT and iOSRemind is true.

ios notification body

iOSMusic

string

No

iOS notification sound. Specify the name of an audio file stored in the app bundle or the sandbox Library/Sounds directory. See: How to Set iOS Push Notification Sound.

If set to an empty string (""), the notification will be silent; if not set, it defaults to the system alert sound.

""

iOSBadge

integer

No

iOS app icon badge number in the upper-right corner.

Note

If iOSBadgeAutoIncrement is set to True, this field must be empty.

0

iOSBadgeAutoIncrement

boolean

No

Whether to enable badge auto-increment. Default is false.

Note

When this is set to true, iOSBadge must be empty.

The badge auto-increment feature is maintained by the push server for each device's badge count. Users must use SDK version 1.9.5 or above and actively sync the badge count to the server.

true

iOSSilentNotification

boolean

No

Whether to enable iOS silent notification.

true

iOSMutableContent

boolean

No

iOS notification processing extension flag (iOS 10+). If set to true, the APNs push notification can reach the Extension for processing before being displayed. For silent notifications, this must be set to true.

true

iOSNotificationCategory

string

No

Specify the iOS notification Category (iOS 10+).

ios

iOSNotificationCollapseId

string

No

When a device receives messages with the same CollapseId, they will be merged into one. When the device is offline and consecutive messages with the same CollapseId are sent, only the latest one is displayed in the notification bar. iOS 10+ supports this parameter.

ZD2011

iOSNotificationThreadId

string

No

This attribute is used to group iOS remote notifications, identifying the group name for collapsed notifications. Only supported on iOS 12.0+.

abc

iOSInterruptionLevel

string

No

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 displays the notification immediately, lights up the screen, and can play a sound, but does not break through system notification controls.

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

active

iOSRelevanceScore

number

No

Summary highlight score. Value range: floating-point number in [0,1].

0.01

iOSExtParameters

string

No

Extension attributes for iOS notifications.

For iOS 10+, you can specify the resource URL for rich media push notifications here: {"attachment": "https://xxxx.xxx/notification_pic.png"}. This parameter must be passed in JSON map format, otherwise parsing will fail.

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

iOSLiveActivityEvent

string

No

Start, update, or end a Live Activity.

  • Enum: start | update | end

start

iOSLiveActivityId

string

No

The Live Activity ID reported from the device to the user's server. The unique identifier of the Live Activity.

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

iOSLiveActivityAttributesType

string

No

The type of Live Activity to start.

Note

Required when iOSLiveActivityEvent is start.

OrderActivityAttributes

iOSLiveActivityAttributes

string

No

JSON string, static parameters for Live Activity (Dynamic Island) push. Contains static user-defined information such as product IDs and order information.

Note

Required when iOSLiveActivityEvent is start.

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

iOSLiveActivityContentState

string

No

Dynamic parameters for Live Activity (Dynamic Island) push, containing real-time update information such as price and inventory changes.

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

iOSLiveActivityDismissalDate

integer

No

Timestamp in seconds. The ended Live Activity will remain on the lock screen until this specified time, with a maximum of 4 hours.

1743131967

iOSLiveActivityStaleDate

integer

No

Timestamp in seconds. Marks the expiration time of the activity content.

1743131967

AndroidNotifyType

string

No

Notification alert type. Valid values:

  • VIBRATE: Vibration (default)

  • SOUND: Sound

  • BOTH: Sound and vibration

  • NONE: Silent

BOTH

AndroidRemind

boolean

No

When the push type is message and the device is offline, this push will use the supplementary popup feature. Default is false. Only effective when PushType=MESSAGE.

If the message-to-notification push is successful, the notification displays the AndroidPopupTitle and AndroidPopupBody parameter values set on the server. The data obtained in the onSysNoticeOpened method of the supplementary popup when clicking the notification is the Title and Body parameter values set on the server.

true

AndroidOpenType

string

No

Action after clicking the notification. Valid values:

  • APPLICATION: Open the application (default)

  • ACTIVITY: Open an Android Activity

  • URL: Open a URL

  • NONE: No redirect

APPLICATION

AndroidActivity

string

No

Specify the activity to open from the notification.

Only pass this when AndroidOpenType="Activity", e.g.: com.alibaba.cloudpushdemo.bizactivity.

com.alibaba.cloudpushdemo.bizactivity

AndroidOpenUrl

string

No

URL to open when Android receives the push.

Only pass this when AndroidOpenType="URL".

https://xxxx.xxx

AndroidPopupActivity

string

No

Specify the Activity to navigate to after clicking the notification.

com.alibaba.cloudpushdemo.bizactivity

AndroidPopupTitle

string

No

Title content in supplementary popup mode. Required when the AndroidPopupActivity parameter is not empty.

Length limit: 50 characters (both Chinese and English characters count as one character).

If using vendor channels, it must also comply with vendor channel limits. For details, see: Android Supplementary Channel Push Limits.

hello

AndroidPopupBody

string

No

Body content in supplementary popup mode. Required when the AndroidPopupActivity parameter is not empty.

Length limit: 200 characters (both Chinese and English characters count as one character).

If using vendor channels, it must also comply with vendor channel limits. For details, see: Android Supplementary Channel Push Limits.

hello

AndroidRenderStyle

integer

No

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 the proprietary channel, not supported on Xiaomi devices)

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

Note

If using a non-standard mode, this parameter must be provided.

Valid values:

  • 0 :

    0

  • 1 :

    1

  • 2 :

    2

1

AndroidBigTitle

string

No

Title in long text mode. Length limit: 200 bytes (1 Chinese character counts as 3 bytes).

  • Currently only supported by the Honor channel and Huawei channel EMUI 11 and above.

  • If not provided in long text mode, the first non-empty value from Title or AndroidPopupTitle is used.

Example long title

AndroidBigBody

string

No

Body in long text mode. Length limit: 1000 bytes (1 Chinese character counts as 3 bytes). Subject to specific vendor channel limits when sending.

Currently supported by:

  • Huawei: EMUI 10 and above

  • Honor: Magic UI 4.0 and above

  • Xiaomi: MIUI 10 and above

  • OPPO: ColorOS 5.0 and above

  • Meizu: Flyme

  • Proprietary channel: Android SDK 3.6.0 and above

Note

If not provided in long text mode, the first non-empty value from Body or AndroidPopupBody is used.

Example long text

AndroidBigPictureUrl

string

No

Image URL in big picture mode. Currently supported by: Proprietary channel: Android SDK 3.6.0 and above.

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

AndroidXiaomiBigPictureUrl deprecated

string

No

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

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

AndroidImageUrl

string

No

Right-side icon URL. Currently supported by:

  • Huawei EMUI (only applicable in long text mode and Inbox mode).

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

  • Proprietary channel: Android SDK 3.5.0 and above.

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

AndroidXiaomiImageUrl deprecated

string

No

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

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

AndroidInboxBody

string

No

Body content in Inbox mode. The content must be a valid JSON Array with no more than 5 elements. Currently supported by:

  • Huawei: EMUI 9 and above

  • Honor: Magic UI 4.0 and above

  • Xiaomi: MIUI 10 and above

  • OPPO: ColorOS 5.0 and above

  • Proprietary channel: Android SDK 3.6.0 and above

["Line 1","Line 2"]

AndroidNotificationBarType

integer

No

Android custom notification bar style. Value range: 1-100.

2

AndroidNotificationBarPriority

integer

No

Priority of the Android notification position in the notification bar. Valid values: -2, -1, 0, 1, 2.

0

AndroidNotificationNotifyId

integer

No

Unique identifier for each message when displayed in the notification bar. Different notification bar messages can share the same NotifyId, allowing new notifications to replace old ones.

100001

AndroidNotificationChannel

string

No

The channelId of the Android app, which must correspond to the channelId in the app.

  • Set the NotificationChannel parameter. For specific usage, see FAQ: Notifications Not Received on Android 8.0+ Devices.

  • Since the OPPO private message channel's channel_id is the same as the app's channelId, the channel_id for OPPO channel push takes this value.

  • For Huawei, FCM, and Alibaba Cloud proprietary channel push, the channel_id takes this value.

1

AndroidNotificationHuaweiChannel

string

No

Set the Huawei notification message classification importance parameter, which determines notification behavior on user devices. Valid values:

  • LOW: Information and marketing messages

  • NORMAL: Service and communication messages

Note
  • Huawei channel currently recommends using AndroidMessageHuaweiCategory for notification classification. AndroidNotificationHuaweiChannel is no longer required.

  • Requires application on the Huawei platform. Application Link.

Valid values:

  • LOW :

    LOW

  • NORMAL :

    NORMAL

LOW

AndroidNotificationHonorChannel

string

No

Set the Honor notification message classification importance parameter, which determines notification behavior on user devices. Valid values:

  • LOW: Information and marketing messages

  • NORMAL: Service and communication messages

Requires application on the Honor platform. Application Link.

Valid values:

  • LOW :

    LOW

  • NORMAL :

    NORMAL

LOW

AndroidNotificationXiaomiChannel

string

No

Set the Xiaomi notification type channelId. Requires application on the Xiaomi platform. For details, see: Application Link.

Note
  • A single application can apply for a maximum of 8 channels on the Xiaomi channel. Please plan ahead.

michannel

AndroidNotificationVivoChannel

string

No

Set the vivo notification message classification. Valid values:

  • 0: Operational messages (default)

  • 1: System messages

Note
  • vivo channel currently recommends using AndroidMessageVivoCategory for notification classification. AndroidNotificationVivoChannel is no longer required.

  • Requires application on the vivo platform. For details, see: Application Link.

Valid values:

  • 0 :

    0

  • 1 :

    1

classification

AndroidNotificationGroup

string

No

Message grouping. Messages in the same group are displayed as only the latest one in the notification bar along with the total count of messages received for that group. All messages are not shown and cannot be expanded. Currently supported by:

  • Huawei vendor channel

  • Honor vendor channel

  • Proprietary channel: Android SDK 3.9.1 and below

Note

The proprietary channel no longer supports this parameter on Android SDK 3.9.2 and above.

group-1

AndroidNotificationThreadId

string

No

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

  • Proprietary channel: Android SDK 3.9.2 and above

thread-1

AndroidExtParameters

string

No

Set the extension attributes of the notification. This attribute does not take effect when PushType is set to MESSAGE.

This parameter must be passed in JSON map format, otherwise parsing will fail.

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

AndroidMessageHuaweiUrgency

string

No

Huawei channel notification delivery priority. Valid values:

  • HIGH

  • NORMAL

Requires permission application. For details, see: Application Link.

Valid values:

  • HIGH :

    HIGH

  • NORMAL :

    NORMAL

HIGH

AndroidMessageHuaweiCategory

string

No

Purpose 1: After completing the self-classification rights application, this is used to identify the message type, determine the message notification method, and accelerate delivery for specific message types. For valid values, refer to the Message Classification Standard in Huawei's official push documentation, using the "Cloud notification category value" or "Local notification category value" from the table.

Purpose 2: After applying for special permissions, this is used to identify high-priority transparent transmission scenarios. Valid values:

  • VOIP: Audio/video calls

  • PLAY_VOICE: Voice playback

Note

For items where "Cloud notification category value" is "Not applicable", they are delivered through the Alibaba Cloud proprietary channel. For items where "Local notification category value" is "Not applicable", they are delivered through the Huawei channel.

VOIP

AndroidMessageOppoCategory

string

No

OPPO classifies messages into two categories for management: Communication & Service, and Content & Marketing.

Communication & Service (requires permission application):

  • IM: Instant messaging, audio, video calls

  • ACCOUNT: Personal account and asset changes

  • DEVICE_REMINDER: Personal device reminders

  • ORDER: Personal order/logistics status changes

  • TODO: Personal schedules/to-dos

  • SUBSCRIPTION: Personal subscriptions

Content & Marketing:

  • NEWS: News and information

  • CONTENT: Content recommendations

  • MARKETING: Platform promotions

  • SOCIAL: Social updates

For details, refer to OPUSH Message Classification Rules.

MARKETING

AndroidMessageOppoNotifyLevel

integer

No

OPPO channel notification bar message notification level. Valid values:

  • 1: Notification bar

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

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

Note

When using the AndroidMessageOppoNotifyLevel parameter, the AndroidMessageOppoCategory parameter must also be provided.

1

AndroidMessageVivoCategory

string

No

vivo classifies messages into two categories for management: System messages and Operational messages. System messages:

  • IM: Instant messages

  • ACCOUNT: Accounts and assets

  • TODO: Schedules and to-dos

  • DEVICE_REMINDER: Device information

  • ORDER: Orders and logistics

  • SUBSCRIPTION: Subscription reminders

Operational messages:

  • NEWS: News

  • CONTENT: Content recommendations

  • MARKETING: Operational promotions

  • SOCIAL: Social updates

For details, refer to Classification Description.

TODO

AndroidTargetUserType

integer

No

Set vendor channel notification type:

  • 0: Official notification (default).

  • 1: Test notification.

Note
  • When this parameter is configured, it is equivalent to simultaneously configuring AndroidHuaweiTargetUserType, AndroidHonorTargetUserType, AndroidVivoPushMode, and AndroidOppoIntentEnv. The specific vendor channel parameters can override this parameter.

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

0

AndroidHuaweiTargetUserType

integer

No

Set Huawei channel notification type:

  • 0: Official notification (default).

  • 1: Test notification.

Note

Each application can send up to 500 test notifications per day, and these are not subject to the daily per-device push limit.

Valid values:

  • 0 :

    0

  • 1 :

    1

0

AndroidHonorTargetUserType

integer

No

Set Honor channel notification type:

  • 0: Official notification (default).

  • 1: Test notification.

Note

Each application can send up to 1000 test notifications per day, and these are not subject to the daily per-device push limit.

0

AndroidVivoPushMode

integer

No

Set vivo channel notification type:

  • 0: Official push (default).

  • 1: Test push.

Note

For test push, please configure the test device on the vivo console in advance. The test device RegId can be obtained by searching for "onReceiveRegId regId" in the device startup logs.

Valid values:

  • 0 :

    0

  • 1 :

    1

0

AndroidOppoIntentEnv

integer

No

Set OPPO Fluid Cloud push environment:

  • 0: Production environment (default).

  • 1: Test environment.

Note

OPPO Fluid Cloud test environment requires setting up the client environment as described in Environment Setup.

1

AndroidHuaweiBusinessType

integer

No

Set Huawei Quick Notification parameter:

  • 0: Send Huawei standard notification (default).

  • 1: Send Huawei Quick Notification.

1

AndroidHuaweiReceiptId

string

No

Huawei channel receipt ID. This receipt ID can be found in the receipt parameter configuration on the Huawei channel push management platform.

Note

If the default receipt configuration on the Huawei channel push management platform is set to the Alibaba Cloud receipt, this is not required. If not, it is recommended to configure the Huawei channel default receipt ID in the Alibaba Cloud EMAS Mobile Push console first.

RCP4C123456

AndroidVivoReceiptId

string

No

vivo channel receipt ID. This receipt ID can be found in the application information of the push service on the vivo open platform.

Note

If the default receipt configuration on the vivo open platform is set to the Alibaba Cloud receipt, this is not required. If not, it is recommended to configure the vivo channel default receipt ID in the Alibaba Cloud EMAS Mobile Push console first.

123

AndroidBadgeClass

string

No

Full class name of the app entry Activity for badge settings.

Note

Only effective for Huawei/Honor vendor channel push.

com.alibaba.cloudpushdemo.bizactivity

AndroidBadgeAddNum

integer

No

Set the badge increment value, which is added to the current badge count. Value range: [1-99].

Note

Only effective for Huawei/Honor vendor channel push. When both AndroidBadgeAddNum and AndroidBadgeSetNum are present, AndroidBadgeSetNum takes precedence.

1

AndroidBadgeSetNum

integer

No

Set a fixed badge number. Value range: [0-99].

Note

For vendor channel push, only effective on Huawei and Honor channels. For Alibaba Cloud proprietary channel push, only effective on Huawei, Honor, and vivo devices.

5

AndroidMusic

string

No

Huawei vendor channel notification sound. Specify the name of an audio file stored in the client project's app/src/main/res/raw/ directory, without the file extension.

If not set, the default ringtone is used.

alicloud_notification_sound

HarmonyRemind

boolean

No

When the push type is message and the device is offline, this push will use the supplementary popup feature. Default is false. Only effective when PushType=MESSAGE.

If the message-to-notification push is successful, the notification displays the HarmonyRemindTitle and HarmonyRemindBody parameter values set on the server.

false

HarmonyRemindTitle

string

No

HarmonyOS notification title used when converting HarmonyOS messages to notifications. Only valid when HarmonyRemind is true.

New message

HarmonyRemindBody

string

No

HarmonyOS notification content used when converting HarmonyOS messages to notifications. Only valid when HarmonyRemind is true.

You have a new message, please check

HarmonyCategory

string

No

Notification message category. After completing the notification message self-classification rights application, this is used to identify the message type. Different notification message types affect how messages are displayed and how alerts are triggered. Valid values:

  • IM: Instant messaging

  • VOIP: Audio/video calls

  • SUBSCRIPTION: Subscriptions

  • TRAVEL: Travel

  • HEALTH: Health

  • WORK: Work task reminders

  • ACCOUNT: Account updates

  • EXPRESS: Orders & logistics

  • FINANCE: Finance

  • DEVICE_REMINDER: Device reminders

  • MAIL: Email

  • CUSTOMER_SERVICE: Customer service messages

  • MARKETING: News, content recommendations, social updates, product promotions, financial updates, lifestyle information, surveys, feature recommendations, operational promotions (only identifies content, does not accelerate message delivery), collectively referred to as information and marketing messages

For details, see the HarmonyOS official documentation Notification.category.

IM

HarmonyNotificationSlotType

string

No

Use the specified notification channel type. Only effective 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 used for customer service messages between users and merchants, and must be initiated by the user.

  • OTHER_TYPES: Other.

For details, see the HarmonyOS official documentation SlotType.

SOCIAL_COMMUNICATION

HarmonyNotifyId

integer

No

Unique identifier for each message when displayed as a notification. If not provided, the push service automatically generates a unique identifier for each message. Different notification messages can share the same notifyId, enabling the new message to replace the old one.

For details, see the HarmonyOS official documentation Notification.notifyId.

0

HarmonyActionType

string

No

Action after clicking the notification. Valid values:

  • APP_HOME_PAGE: Open app home page

  • APP_CUSTOM_PAGE: Open app custom page

APP_HOME_PAGE

HarmonyAction

string

No

The action corresponding to the in-app page ability.

Important When HarmonyActionType is APP_CUSTOM_PAGE, at least one of HarmonyUri and HarmonyAction must be provided.

For details, see the HarmonyOS official documentation ClickAction.action.

com.example.action

HarmonyUri

string

No

The URI corresponding to the in-app page ability.

Important When HarmonyActionType is APP_CUSTOM_PAGE, at least one of HarmonyUri and HarmonyAction must be provided. When multiple Abilities exist, fill in the action and uri of each Ability separately. The action is used first to find the corresponding in-app page.

For details, see the HarmonyOS official documentation ClickAction.uri.

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

HarmonyRenderStyle

string

No

Notification message style:

  • NORMAL: Standard notification (default)

  • MULTI_LINE: Multi-line text style

NORMAL

HarmonyImageUrl

string

No

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

Note

Supported image formats: png, jpg, jpeg, heif, gif, bmp. Image width * height must be less than 25000 pixels.

For details, see the HarmonyOS official documentation Notification.image.

https://example.com/xxx.png

HarmonyInboxContent

string

No

Content for multi-line text style. Required when HarmonyRenderStyle is MULTI_LINE. Supports up to 3 items.

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

HarmonyExtParameters

string

No

Set the extension attributes of the notification. This attribute does not take effect when PushType is set to MESSAGE.

This parameter must be passed in JSON map format, otherwise parsing will fail.

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

HarmonyTestMessage

boolean

No

Test message flag:

  • false: Official message (default)

  • true: Test message

For details, see the HarmonyOS official documentation pushOptions.testMessage.

true

HarmonyReceiptId

string

No

HarmonyOS channel receipt ID. This receipt ID can be found in the receipt parameter configuration on the HarmonyOS channel push management platform.

Note

If the default receipt configuration on the HarmonyOS channel push management platform is set to the Alibaba Cloud receipt, this is not required. If not, it is recommended to configure the HarmonyOS channel default receipt ID in the Alibaba Cloud EMAS Mobile Push console first.

For details, see the HarmonyOS official documentation pushOptions.receiptId.

RCPB***DFD5

HarmonyExtensionPush

boolean

No

When PushType is NOTICE, whether to send as a HarmonyOS notification extension message.

  • true: Send notification extension message

  • false: Send standard notification (default)

Notification extension messages require permission application on the HarmonyOS side before sending. For details, refer to the HarmonyOS documentation Send Notification Extension Messages.
Supported from HarmonyOS SDK 1.2.0.

true

HarmonyExtensionExtraData

string

No

Extra data for notification extension messages.
Effective when sending HarmonyOS notification extension messages.
Conceptually equivalent to the extraData field of HarmonyOS notification extension messages. For the specific definition, refer to HarmonyOS ExtensionPayload Description.
Supported from HarmonyOS SDK 1.2.0.

Example extra data

HarmonyBadgeAddNum

integer

No

HarmonyOS app badge increment number. Refer to HarmonyOS badge addNum field description.
Supported from HarmonyOS SDK 1.2.0.

1

HarmonyBadgeSetNum

integer

No

HarmonyOS app badge set number. Refer to HarmonyOS badge setNum field description. Supported from HarmonyOS SDK 1.2.0.

1

SmsTemplateName

string

No

The template name for supplementary SMS. This can be obtained from the SMS template management page and is a system-assigned name, not a developer-defined name.

SMS template name

SmsSignName

string

No

The signature for supplementary SMS.

SMS signature

SmsParams

string

No

Variable name-value pairs for the SMS template, in the format: key1=value1&key2=value2.

key1=value1

SmsDelaySecs

integer

No

Delay time before triggering SMS, in seconds.

Must be set when using SMS convergence. Recommended to be 15 seconds or more, with a maximum of 3 days, to avoid duplication between SMS and push notifications.

Note

When SMS convergence is used, the ExpireTime parameter becomes ineffective. The notification expiration time is calculated based on the SmsDelaySecs parameter, with the expiration time being the current time plus SmsDelaySecs.

15

SmsSendPolicy

integer

No

Condition for triggering SMS. Valid values:

  • 0: Triggered when push is not received.

  • 1: Triggered when user has not opened the notification.

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 supplementary popups are now supported by the new parameter AndroidPopupTitle.

N/A

AndroidXiaoMiNotifyBody deprecated

string

No

This parameter is deprecated. All third-party supplementary popups are now supported by the new parameter AndroidPopupBody.

N/A

AndroidXiaoMiActivity deprecated

string

No

This parameter is deprecated. All third-party supplementary popups are now supported by the new parameter AndroidPopupActivity.

N/A

IdempotentToken

string

No

An idempotent parameter to prevent duplicate pushes caused by API client retries. When the same IdempotentToken is used for calls within 15 minutes, only one push will be made, and subsequent calls will return the result of the first successful push.

Note
  • The parameter format is a standard 36-character UUID (8-4-4-4-12). Each valid character is a hexadecimal digit in the range 0-9 or a-f, case-insensitive.

  • This parameter is only used to prevent duplicate pushes caused by retries. It cannot prevent duplicate pushes caused by 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

Variable name and value in the OPPO private message template title

my_title

AndroidOppoPrivateContentParameters

object

No

OPPO private message template content parameters

string

No

Variable name and value in the OPPO private message template content

my_content

AndroidXiaomiTemplateId

string

No

Xiaomi private message template ID

P10645

AndroidXiaomiTemplateParams

string

No

Xiaomi private message template parameters, JSON string

{"keywords1":"Tom","keywords2":"phone"}

HarmonyLiveViewPayload

string

No

JSON string of the HarmonyOS Live View data structure LiveViewPayload. For development integration, refer to the documentation HarmonyOS Live View Push Guide.

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

AndroidHuaweiLiveNotificationPayload

string

No

JSON string of the Huawei Android Live Notification data structure LiveNotificationPayload. For development integration, refer to the documentation Huawei Live Notification Push Guide.

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

AndroidOppoIntelligentIntent

string

No

JSON string of the OPPO Fluid Cloud intent sharing data structure IntelligentIntent. For development integration, refer to the documentation 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

JSON string of the OPPO Fluid Cloud intent deletion data structure data. When the AndroidOppoIntelligentIntent parameter is already provided, this parameter is ignored. For development integration, refer to the documentation OPPO Fluid Cloud Push Guide.

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

AndroidVivoLiveMessage

string

No

JSON string of the vivo Atomic Island data structure liveMessage. For development integration, refer to the documentation vivo Atomic Island Push Guide.

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

AndroidXiaomiFocusParam

string

No

JSON string of the Xiaomi Super Island data structure miui.focus.param. For development integration, refer to the documentation Xiaomi Super Island Push Guide.

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

AndroidXiaomiFocusPics

string

No

JSON string of the Xiaomi Super Island image data miui.focus.pic_xxx. For development integration, refer to the documentation 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 on Request Parameters

Title/Body details are as follows:

Attribute\Push TypeMessage (iOS)Message (Android)Notification (iOS)Notification (Android)
TitleMessage title, corresponding to the title field of CCPSysMessage in the message callbackCPushMessage.title fieldNotification titleNotification title, notification callback method (onNotificationOpened)
BodyMessage body, corresponding to the body field of CCPSysMessage in the message callbackMessage body, CPushMessage.content fieldNotification contentNotification content, notification callback method (onNotificationOpened)

The following configurations only apply to the Android supplementary popup feature:

When the device is offline during push (i.e., the persistent connection to the push server is disconnected), the push can activate the supplementary popup feature. To enable the supplementary popup feature, see Mobile Push Supplementary Channel Configuration. The following conditions must also be met:

  • Third-party supplementary channels are integrated.

  • The StoreOffline parameter is set to true.

  • Push notification (no need to set AndroidRemind) or push message with AndroidRemind set to true.

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

Response elements

Element

Type

Description

Example

object

MessageId

string

The message ID that identifies a push operation.

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. The period between start time and end time exceeds %s days.
400 Invalid%s.Format The specified %s format is invalid. Invalid parameter format.
400 AccountDisabled Your account is not enabled. The feature is not enabled.
400 FileNotExist The specified file does not exist. The specified file does not exist.
400 IncorrectPassword The password is incorrect. Incorrect password.
400 NotApnsCertificate The Certificate is not an APNs certificate. The certificate is not an APNs certificate.
400 PermissionDenied The specified AppKey is not authorized.
400 SendSpeedNotSupported SendSpeed is not supported for specified Target. The specified target does not support the SendSpeed parameter.
400 SmsProfileConfigFailed Failed to configure SMS profile. Failed to configure SMS profile.
400 SmsProfileGetFailed Failed to get SMS profile. Failed to get SMS profile.
400 SmsRoleAuthorizeFailed Failed to authorize SMS role. Failed to authorize SMS role.
400 SmsRoleUnauthorized The SMS role is unauthorized. The SMS role is not authorized.
400 TagsNumberBeyondLimit The number of tags bound to this app exceeds the limit. The number of tags bound to this app exceeds the limit.
400 Invalid%s.LengthExceed The specified %s length cannot be greater than %s. The parameter length exceeds the limit.
400 Invalid%s.BytesExceed The specified %s exceeds the %s bytes limit. The parameter byte size exceeds the limit.
400 Invalid%s.Empty The specified %s cannot be empty. The parameter cannot be empty.
400 Invalid.Parameter The specified parameter is invalid: %s. Parameter %s is invalid.
400 TargetNotSupported Target is not supported for batch push. The specified 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. Server error. We recommend that you retry the request. If the error persists, submit a ticket.
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.