Push API
Push a notification or message to a single device or a list of devices.
The content pushed can only be JSON Represents a push object.
This is Push API Recent version.
compared to API v2 version, the improvements of v3 version are:
- Completely based on https and support http2, no longer available http access;
- use HTTP Basic Authentication way to do access authorization. This whole API Requests can be made using the common HTTP Tools to complete, such as:curl, browser plug-ins, etc.;
- Push content is fully used JSON format;
- Supported features have been improved: support for more tag And or operations; notifications or customized messages can be sent separately, or notifications and customized messages can be pushed at the same time;windows phone Currently there are only notifications.
Calling address
Call verification
For details, see REST API Outlined Authentication method illustrate.
Request example
Request header
> POST /v3/push HTTP/1.1
> Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==
Request body
{
"platform": "all",
"audience": {
"tag": [
"深圳",
"北京"
]
},
"notification": {
"alert": "Hello, {{content}}!",
"android": {
"alert": "Hi, JPush!",
"title": "Send to Android",
"builder_id": 1,
"large_icon": "http://www.jiguang.cn/largeIcon.jpg",
"intent": {
"url": "intent:#Intent;component=com.jiguang.push/com.example.jpushdemo.SettingActivity;end"
},
"extras": {
"newsid": 321
}
},
"ios": {
"alert": "Hi, JPush!",
"sound": "default",
"badge": "+1",
"thread-id": "default",
"extras": {
"newsid": 321
}
},
"hmos" : {
"alert":"hmos alert",
"title":"hmos titile",
"intent": {
"url":"scheme://test?key1=val1&key2=val2"
},
"badge_add_num":1,
"badge_set_num":1,
"extras": {
"age":18
},
"category":"IM",
"test_message":false,
"receipt_id":"abc1212",
"large_icon":"https://www.jiguang.cn/largeIcon.jpg",
"style":0,
"push_type": 0
},
"voip": { // 此功能需要 JPush iOS SDK v3.3.2 及以上版本支持
"key": "value" // 任意自定义 key/value 对,api 透传下去
},
"quickapp": {
"alert": "Hi, JPush!",
"title": "Send to QuickApp",
"page": "/page1"
}
},
"message": {
"msg_content": "Hi,JPush",
"content_type": "text",
"title": "msg",
"extras": {
"key": "value"
}
},
"sms_message": {
"temp_id": 1250,
"temp_para": {
"code": "123456"
},
"delay_time": 3600,
"active_filter": false
},
"options": {
"time_to_live": 60,
"apns_production": false,
"apns_collapse_id": "jiguang_test_201706011100"
},
"callback": {
"url": "http://www.bilibili.com",
"params": {
"name": "joe",
"age": 26
},
"type": 3
},
"cid": "8103a4c628a0b98974ec1949-711261d4-5f17-4d2f-a855-5e5a8909b26e"
}
Push parameters
Pushed parameter structure. Note that some parameters cannot be used at the same time. See the table below for details:
| Keywords | Options | meaning |
|---|---|---|
| platform | Required | Push platform settings |
| audience | Required | Push device designation |
| notification | Optional | |
| alert | Optional | For details of notification content on each platform, see alert 。 |
| android | Optional | Android Notifications on the platform, please see android 。 |
| ios | Optional | iOS on the platform APNs Notification structure, see ios 。 |
| quickapp | Optional | Notification structure on the quick application platform, see for details quickapp 。 |
| hmos | Optional | Notification structure on Hongmeng platform, please see hmos 。 |
| voip | Optional | iOS VOIP Function. This type of push supports and iOS of Notification Notifications coexist, see for details voip 。 |
| message | Optional | |
| inapp_message | Optional | |
| live_activity | Optional | |
| sms_message | Optional | SMS channel supplements delivery content |
| options | Optional | Push parameters |
| callback | Optional | callback parameters |
| notification_3rd | Optional | |
| cid | Optional | used to prevent api An identifier defined by the caller's retries resulting in repeated pushes from the server. For details on how to obtain it, see Advanced features API。 |
platform:Push platform
JPush Currently supported Android, iOS, QuickApp,HarmonyOS Push on four platforms. The keywords are: "android", "ios", "quickapp", "hmos"。
If the target platform is iOS platform, push Notification when needed options pass apns_production field to set the push environment.True Indicates pushing to the production environment,False Indicates that the development environment is to be pushed; if not specified, the production environment is pushed; it can only be pushed to one environment at a time.
Push to all platforms:
{"platform" : "all"}
Specify a specific push platform:
{"platform" : ["android", "ios","quickapp","hmos"] }
audience:Push target
Push device object, indicating the list of devices to which a push can be pushed. Confirm push device object,JPush A variety of methods are provided, such as: alias, tag, registration ID, grouping, broadcast, etc.
push target
There are several ways to select equipment outside of broadcast:
| Keywords | type | meaning | illustrate | Remark |
|---|---|---|---|---|
| all | String | broadcast | Push to all devices | |
| tag | JSON Array | Tag OR | array. There is an OR relationship between multiple tags, that is, a union. | |
| tag_and | JSON Array | Label AND | array. between multiple tags AND Relationship, that is, intersection. | |
| tag_not | JSON Array | Label NOT | array. Between multiple labels, first take the union of multiple labels, and then take the complement of the result. | |
| alias | JSON Array | Alias | array. There is an OR relationship between multiple aliases, that is, a union. | |
| registration_id | JSON Array | Registration ID | array. There is an OR relationship between multiple registration IDs, that is, a union. | |
| segment | JSON Array | user segment ID | Created on pageuser segmentID. Defined as an array, but currently limited to pushing one at a time. | The current limit is that you can only push one at a time. |
| abtest | JSON Array | A/B Test ID | Created on page A/B The ID of the test. Defined as an array, but currently limited to pushing one at a time. | Currently the limit is only one push at a time. |
| live_activity_id | String | Real-time activity identification | correspond iOS SDK liveActivityId For the value, refer to the client:registerLiveActivity。 | This method cannot be used with otheraudienceMethods can be used in combination, such as not allowed (live_activity + tag combination). |
At least one of the above types is required. If the value array length is 0, it means the type does not exist.
These types can coexist (live_activity_idExcept), the implicit relationship between multiple items is AND, that is, taking the intersection of several types of results.
For example:
"audience" : {"tag" : [ "tag1", "tag2"], "tag_and" : ["tag3", "tag4"], "tag_not" : ["tag5", "tag6"] }
Calculate first"tag"Result of field tag1 或 tag2=A;
Calculate again"tag_and"Result of field tag3 且 tag4=B;
Calculate again"tag_not"Result of field 非 (tag5 或 tag6)=C;
"audience"The final result is A 且 B 且 C 。
Example
- Push to all (broadcast):
{
"platform": "all",
"audience" : "all",
"notification" : {
"alert" : "Hi, JPush!",
"android" : {
"alert" : "Hi, JPush!"
},
"ios" : {
"extras" : {
"newsid" : 321
}
}
}
}
- Push to multiple tags (as long as they are within the scope of any tag): in Shenzhen, Guangzhou, or Beijing
{
"audience" : {
"tag" : [ "深圳", "广州", "北京"]
}
}
- Push to multiple tags (need to be within the scope of multiple tags at the same time): in Shenzhen and "female"
{
"audience" : {
"tag_and" : [ "深圳", "女"]
}
}
- Push to multiple aliases:
{
"audience" : {
"alias" : [ "4314", "892", "4531"]
}
}
- Push to multiple registration IDs:
{
"audience" : {
"registration_id" : [ "4312kjklfds2", "8914afd2", "45fdsa31"]
}
}
- Can push multiple specified push targets at the same time: in Shenzhen or Guangzhou, and are "female" and "member"
{
"audience" : {
"tag" : [ "深圳", "广州"],
"tag_and" : ["女", "会员"]
}
}
- Push to specified real-time activities:
{
"audience" : {
"live_activity_id" : "312kjklds2"
}
}
notification:notify
The "notification" object is one of the pushed entity content objects (the other is the "message"), which will be pushed to the client as a "notification".
Its subordinate attributes include 4 types, 3 platform attributes, and a "alert" attribute.
alert
- The content of the notification may only have this most basic attribute on each platform. "alert"。
- " of this location"alert" attribute (directly in notification Object) is a shortcut definition for each platform. alert If the information is the same, this definition shall prevail. If each platform has a definition, override the definition here.
Example:
{
"notification": {
"alert": "Hello, JPush!"
}
}
android
Android notifications on the platform,JPush SDK Display according to a certain notification bar style.
Supported fields are:
| Keywords | type | Options | meaning | illustrate |
|---|---|---|---|---|
| alert | string | Required | Notification content | |
| title | string | Optional | Notification title | |
| builder_id | int | Optional | Notification bar style ID | |
| channel_id | String | Optional | android notify channel_id | |
| category | string | Optional | Notification bar message category entries | |
| priority | int | Optional | Notification bar display priority | |
| style | int | Optional | Notification bar style type | Used to specify the notification bar style type, the default is 0. |
| alert_type | int | Optional | Notification reminder method | The optional range is -1~7, and the default is -1. Right now0111Binary, the second digit from the left represents light, the third representative vibrate, the fourth representative sound。 0: Not effective, 1: Effective. like: Notification.DEFAULT_ALL = -1 ,Notification.DEFAULT_SOUND = 1, Notification.DEFAULT_VIBRATE = 2, Notification.DEFAULT_LIGHTS = any "or" combination of 4. |
| big_text | string | Optional | Large text notification bar style | |
| inbox | JSONObject | Optional | Text entry notification bar style | |
| big_pic_path | string | Optional | Large picture notification bar style | For usage details, see Set up a large image document 。 |
| extras | JSON Object | Optional | extension fields | |
| mipns_content_forshort | string | Optional | Xiaomi notification content | Since Xiaomi’s official notice content length limit is128Within characters (both Chinese and English are counted as one), when the notification content (Jiguangof"alert” field value) length exceeds128, the Xiaomi channel will fail to push. Call at this timeJiguangapiWhen pushing notifications, you can use this field to pass in no more than128The notification content of the character is used as the Xiaomi channel notification content. |
| oppns_content_forshort | string | Optional | OPPONotification content | becauseOPPOThe length of the official notification content is limited to 50 characters (both Chinese and English are counted as one). When the notification content (Jiguangof"alert"field value) length exceeds 50,OPPOThe channel will fail to push. Call at this timeJiguangapiWhen pushing a notification, you can use this field to pass in notification content not exceeding 50 characters asOPPOChannel notification content. |
| vpns_content_forshort | string | Optional | vivoNotification content | becausevivoThe official notification content length limit is100Within characters (both Chinese and English are counted as one), when the notification content (Jiguangof"alert” field value) length exceeds100hour,vivoThe channel will fail to push. Call at this timeJiguangapiWhen pushing notifications, you can use this field to pass in no more than100character notification content asvivoChannel notification content. |
| mzpns_content_forshort | string | Optional | Meizu notification content | Since Meizu’s official notice content length limit is100Within characters (both Chinese and English are counted as one), when the notification content (Jiguangof"alert” field value) length exceeds100, the Meizu channel will fail to push. Call at this timeJiguangapiWhen pushing notifications, you can use this field to pass in no more than100The notification content of the character is used as the Meizu channel notification content. |
| large_icon | string | Optional | Notification bar large icon | For usage details, see Set icon document 。 |
| small_icon_uri | string | Optional | Notification bar small icon | For usage details, see Set icon document 。 |
| icon_bg_color | string | Optional | Set notification icon background color | |
| intent | JSON Object | Optional | Specify jump page | use intent inside url Specify the target page to jump to after clicking the notification bar; 1. Jump to target page: intent:#Intent;action=action path;component= package name /Activity full name;end (OPPO and FCM The channel must pass "action Path", other manufacturers must pass "Activity Full name", otherwise there will be a problem that the corresponding manufacturer cannot be redirected) 2. Jump to deeplink address: scheme://test?key1=val1&key2=val2 3. Application home page: intent:#Intent;action=android.intent.action.MAIN;end (Fixed to this address) |
| uri_activity | string | Optional | Specify jump page | |
| uri_action | string | Optional | Specify jump page | |
| badge_add_num | int | Optional | Set the cumulative value of the subscript number, and accumulate it based on the original subscript. | Example:badge_add_num The value is 1 and the original subscript number is 2. After sending this subscript message, the applied subscript number is displayed as 3. |
| badge_set_num | int | Optional | Set the fixed value of the subscript number | |
| badge_class | string | Optional | The application entrance corresponding to the desktop icon Activity kind, for example"com.test.badge.MainActivity” |
|
| sound | string | Optional | ring | |
| show_begin_time | string | Optional | Scheduled display start time (yyyy-MM-dd HH:mm:ss) | |
| show_end_time | string | Optional | Scheduled display end time (yyyy-MM-dd HH:mm:ss) | |
| display_foreground | string | Optional | APP In the foreground, whether the notification is displayed | |
| custom_buttons | JSON Array | Optional | Remote custom notification button | adaptationJiguangChannel and Huawei manufacturer channel. For the complete code structure, please refer to the code example below. Structure field description:
|
{
"notification" : {
"android" : {
"alert" : "hello, JPush!",
"title" : "JPush test",
"builder_id" : 3,
"style":1, // 1,2,3
"alert_type":1, // -1 ~ 7
"big_text":"big text content",
"inbox":{},
"big_pic_path":"picture url",
"priority":0, // -2~2
"category":"category str",
"large_icon": "http://www.jiguang.cn/largeIcon.jpg",
"intent": {
"url": "intent:#Intent;component=com.jiguang.push/com.example.jpushdemo.SettingActivity;end"
},
"extras" : {
"news_id" : 134,
"my_key" : "a value"
},
"custom_buttons": [
{
"name": "button1",
"action_type": 1,
"action": "intent:#Intent;action=com.example.ACTION_ONE;end",
"data": "this is button1"
},
{
"name": "button2",
"action_type": 2,
"action": "scheme://test?key1=val1&key2=val2",
"data": "this is button2"
},
{
"name": "button3",
"action_type": 3
}
]
}
}
}
ios
iOS on the platform APNs notification structure.
The content of this notification will be provided by JPush Agent sent to Apple APNs server and in iOS Presented as a system notification on the device.
The content of this notification satisfies APNs Specification, supported fields are as follows:
| Keywords | type | Options | meaning | illustrate |
|---|---|---|---|---|
| alert | string or JSON Object | Required | Notification content | |
| sound | string or JSON Object | Optional | Notification sound or warning notification | |
| badge | string | Optional | Apply badge | |
| content-available | boolean | Optional | Push to wake up | Carry it when pushing "content-available":true, indicating that it is Background Remote Notification, if this field is not carried, it is ordinary Remote Notification, for details, refer to:Background Remote Notification。 |
| mutable-content | boolean | Optional | notification extension | iOS 10 new Notification Service Extension function, used to report each APNs The delivery status of the information. Using this function requires the client to implement Service Extension interface, and use it on the server side mutable-content The fields are set. |
| category | string | Optional | iOS Classification | iOS 8 Start support, set up APNs payload " incategory" field value. |
| extras | JSON Object | Optional | Additional fields | Customize here Key / value Information for business use, please refer to How to set the right icon/large picture and iOS Notification click to jump。 |
| thread-id | string | Optional | Notification group | ios Remote notifications use this attribute to group notifications. The same thread-id notifications are grouped together. |
| interruption-level | string | Optional | Interruption level for notification priority and delivery time | ios The notification level of 15 can only be active,critical,passive,time-sensitive One of them, please refer to:UNNotificationInterruptionLevel。 |
iOS notify JPush To forward to APNs server.APNs HTTP/2 The push protocol supports delivery of 4096 byte.
JPush Because it is necessary to reassemble the packets and consider a little security redundancy, it is required "iOS":{ } and the overall length within the curly braces must not exceed:3584 bytes.JPush use utf-8 Encoding, so a Chinese character occupies 3 bytes in length.
Server sends message string
{
"notification" : {
"ios" : {
"alert" : "hello, JPush!",
"sound" : "sound.caf",
"badge" : 1,
"extras" : {
"news_id" : 134,
"my_key" : "a value"
}
}
}
}
Client received apns
{
"_j_msgid" = 813843507;
aps = {
alert = "hello,JPush!";
badge = 1;
sound = "sound.caf";
};
"my_key" = "a value";
"news_id" = 134;
}
hmos
Hongmeng (HarmonyOS) notifications on the platform,JPush SDK Display according to a certain notification bar style.
Supported fields are:
| Keywords | type | Options | meaning | illustrate |
|---|---|---|---|---|
| alert | string | Required | Notification content | |
| title | string | Optional | Notification title | |
| category | string | Required | Notification bar message category entries | |
| large_icon | string | Optional | Notification bar large icon | |
| intent | JSON Object | Required | Specify jump page | Support jumping to the application homepage,deeplink address andActionThree types of jumps: 1. Jump to the application homepage: Fixed action.system.home 2. Jump to deeplink address: scheme://test?key1=val1&key2=val2 3. Jump to action address: com.test.action Note: This field is required by the manufacturer, so developers must fill it in.JiguangThis field is not required to be verified internally, so developers are requested to treat it as required. |
| badge_add_num | int | Optional | Set the cumulative value of corner mark numbers | Example:badge_add_num The value is 1 and the original subscript number is 2. After sending this subscript message, the applied subscript number is displayed as 3. |
| badge_set_num | int | Optional | Set the subscript number to a fixed value | |
| test_message | boolean | Optional | Test message ID | Test message identifier: |
| receipt_id | string | Optional | Huawei receipt ID | Enter a unique receipt ID to specify the receipt address and configuration of this downlink message. The receipt ID can be found inHongmeng return receipt parameter configurationView in. |
| extras | JSON Object | Optional | extension fields | |
| style | int | Optional | Notification bar style type | |
| inbox | JSON Object | Optional | Multiline text styles | |
| push_type | int | Optional | Push type | |
| extra_data | string | Optional | Push type | |
| display_foreground | string | Optional | APP In the foreground, whether the notification is displayed | |
| sound | string | Optional | Custom notification ringtone | |
| sound_duration | int | Optional | Customize notification ringtone duration, cooperation requiredsoundField usage | |
| hm_payload | JSON Object | Optional | Hongmeng card refresh message, live window message content body | |
// 指定鸿蒙(HarmonyOS)平台推送:
{
"platform" : ["hmos"]
}
// 通知参数
{
"notification" : {
"hmos" : {
"alert":"hmos alert",
"title":"hmos titile",
"intent": {
"url":"scheme://test?key1=val1&key2=val2"
},
"badge_add_num":1,
"extras": {
"age":18
},
"category":"IM",
"test_message":false,
"receipt_id":"abc1212",
"large_icon":"https://www.jiguang.cn/largeIcon.jpg"
}
}
}
// 卡片刷新消息示例
{
"notification" : {
"hmos" : {
"push_type":1,
"hm_payload": {
"formData": {
"123": 96,
"class": "123"
},
"version": 922337203,
"images": [
{
"keyName": "hello",
"url": "https://xxx.png",
"require": 1
}
],
"formId": 0,
"moduleName": "testName",
"formName": "testFormName",
"abilityName": "testAbilityName"
}
}
}
}
// 实况窗消息示例(航班场景,event为FLIGHT)
{
"notification" : {
"hmos" : {
"push_type":7,
"hm_payload": {
"activityId": 1,
"operation": 0,
"event": "FLIGHT",
"status": "DEPART", // 计划出发
"activityData": {
"notificationData": {
"keywords": {
"flightNo": "MU1471"
},
"type": 5,
"contentTitle": "航班{{status}}", // 航班计划出发
"contentText": [
{
"text": "航班号:"
},
{
"text": "{{flightNo}}", // MU1471
"foregroundColor": "#FF317AF7"
}
],
"clickAction": {
"actionType": 0
},
"firstTextBlock": {
"firstLine": "12:00",
"secondLine": "上海虹桥"
},
"lastTextBlock": {
"firstLine": "14:20",
"secondLine": "成都天府"
},
"displayHorizontalLine": true,
"spaceIcon": "space.png", // 取值为“/resources/rawfile”路径下的文件名
"extend": {
"type": 3,
"pic": "flight.png", // 取值为“/resources/rawfile”路径下的文件名
"clickAction": {
"actionType": 1,
"action": "xxxxxxx"
}
}
},
"capsuleData": {
"type": 1,
"status": 1,
"icon": "icon.svg", // 取值为“/resources/rawfile”路径下的文件名
"bgColor": "#FF317AF7",
"remind": "EXPAND",
"title": "即将出发",
"content": "请尽快前往机场"
}
}
}
}
}
}
quickapp
Notification structure on the quick application platform. The notification content meets the specifications of the quick application platform, and the supported fields are as follows:
自2025.10.30开始,此功能升级为 VIP 用户功能。
| Keywords | type | Options | meaning | illustrate |
|---|---|---|---|---|
| title | string | Required | Notification title | |
| alert | string | Required | Notification content | |
| page | string | Required | Jump page | Quick app notification jump address. |
| extras | JSON Object | Optional | Additional fields | Customize here Key / value Information for business use. |
Server sends message string
{
"notification" : {
"quickapp": {
"alert": "Hi, JPush!",
"title": "Send to QuickApp",
"page": "/page1",
"extras" : {
"news_id" : 134,
"my_key" : "a value"
}
}
}
}
voip
iOS VOIP Function.
This type of push supports and iOS of Notification Notifications coexist, request parameter structure reference:
{
"notification": {
"ios" : {
"alert" : "hello, JPush!",
"sound" : "sound.caf"
},
"voip": {
"key": "value" // 任意自定义 key/value 对,会透传给 APP
}
}
}
message: Custom message
Custom messages, also known as: in-app messages, transparent messages.
- This part of the content will not be displayed on the notification bar.JPush SDK After receiving the message content, it is transmitted transparently to App,need App Handle it yourself.
- iOS Push in-app messaging channels (not APNS) to obtain this part of the content, you need App Be in the foreground.
- Hongmeng Platform (HarmonyOS)from 2024.08.13 Started to support custom messages (corresponding to HarmonyOS official push-type=6 "Background message"), requiring integrationJiguang SDK Version ≥ JPush HarmonyOS SDK v1.1.0。
The message contains the following fields:
| Keywords | type | Options | meaning |
|---|---|---|---|
| msg_content | string | Required | |
| title | string | Optional | |
| content_type | string | Optional | Message content type, developers can define specific types according to their own business. |
| extras | JSON Object | Optional | JSON optional parameters for format |
Android 1.6.2 及以下版本 接收 notification 与 message 并存(即本次 api 调用同时推送通知和消息)的离线推送, 只能收到通知部分,message 部分没有透传给 App。
Android 1.6.3 及以上 SDK 版本已做相应调整,能正常接收同时推送通知和消息的离线记录。
iOS 1.7.3 及以上的版本才能正确解析 v3 的 message,但是无法解析 v2 推送通知同时下发的应用内消息。
inapp_message: In-app enhanced reminders
inapp_message This feature requires Android push SDK≥V3.9.0、iOS push SDK≥V3.4.0, if the version is lower than this, follow the original process.
inapp_message For the notification bar message type, it needs to be matched notification Used together with parameters, users whose notification permission is turned off can enable this feature. After this feature is enabled, when the user runs in the foreground APP, the content of the notification bar message will be displayed as an in-app message.
自2025.10.30开始,此功能升级为 VIP 用户功能。
- inapp_message: For notification bar messages,Boolean type;
- The value is true Indicates enabling the in-app enhanced reminder function;
- The value is false Indicates that in-app enhanced reminders are disabled.
Examples are as follows:
{
"cid": "8103a4c628a0b98974ec1949-711261d4-5f17-4d2f-a855-5e5a8909335e",
"platform": "all",
"audience": {
"tag": [
"深圳",
"北京"
]
},
"notification": {
"android": {
"alert": "Hi, JPush!",
"title": "Send to Android"
},
"ios": {
"alert": "Hi, JPush!",
"sound": "default",
"badge": "+1",
"thread-id": "default",
"extras": {"newsid": 321}
}
},
"inapp_message": {"inapp_message": true}
}
live_activity: Real-time event news
Special Note:
- Real-time activity messaging requires use iOS P8 certificate, corresponding toJiguang WebPortal Integrating settings iOS Authentication method needs to be selected "Token AuthenticationConfigurationWay.
- To create real-time activities remotely, it needs to be matched iOS Push SDK v5.5.0 and above versions.
The real-time activity message content body has the following field information:
| Keywords | type | Options | illustrate |
|---|---|---|---|
| ios | JSON Object | Required | Please refer to the table below for detailed fields iOS JSON Object part. |
iOS JSON Object
| Keywords | type | Options | illustrate |
|---|---|---|---|
| event | string | Required | start:"start",renew:"update",Finish:"end"。 |
| content-state | JSON Object | Required | Need to communicate with client SDK value matches (corresponds to Apple official content-state Field)。 |
| attributes-type | string | Required | Required to create real-time activity events (no need to pass when updating or ending real-time activities), field rules: composed of numbers, letters, and underscores, but cannot start with numbers; corresponding Apple official attributes-type Field |
| attributes | JSON Object | Required | Required to create real-time activity events (no need to pass when updating or ending real-time activities); corresponding Apple official attributes Field |
| relevance-score | int | Optional | correspond Apple official relevance-score Field |
| stale-date | int | Optional | correspond Apple official stale-date Field |
| alert | JSON Object | Optional | |
| dismissal-date | int | Optional | Real-time event end display time. Note: only for event="end" event takes effect. |
iOS alert JSON Object
Keywords
type
Options
illustrate
title
string
Optional
Show toApple Watchmessage title.
body
string
Optional
Show toApple Watchmessage content.
sound
string
Optional
beep.
- iOS Real-time activity news (Live Activity) JPush To be forwarded to Apple servers. Apple requires real-time activity messages (ActivityKit) The size of dynamic update data pushed remotely does not exceed 4096 byte.
- JPush Because it is necessary to reassemble the packets and consider a little security redundancy, it is required "live_activity"Parameter body"iOS":{ } and the overall length within the curly braces must not exceed:3584 bytes.JPush use utf-8 Encoding, so a Chinese character occupies 3 bytes in length.
Real-time activity push example
// 远程更新实时活动
{
"cid": "8103a4c628a0b98974ec1949-711261d4-5f17-4d2f-a855-5e5a8909b26e",
"platform": ["ios"],
"audience": {
"live_activity_id": "abcdef" // 更新或者结束实时活动,audience 必须且只能指定 live_activity_id 进行
},
"live_activity": {
"ios": {
"event": "update",
"content-state":{
"key":"value"
},
"alert":{
"title":"David is on an adventure!",
"body":"David found a sword!",
"sound":"chime.aiff"
},
"dismissal-date": 1168364460
}
},
"options": {
"apns_production": false
}
}
// 远程创建实时活动
{
"cid": "7094b4c628a0b98974ec1949-711261d4-5f17-2f6d-a855-9b26e5e5a890",
"platform": ["ios"],
"audience": {
"tag": [ "深圳", "广州"] // 创建实时活动,audience 支持:广播、tag、alias、registration_id
},
"live_activity": {
"ios": {
"event": "start",
"content-state":{
"currentHealthLevel": 100,
"eventDescription": "Adventure has begun!"
},
"attributes-type": "AdventureAttributes",
"attributes":{
"currentHealthLevel": 100,
"eventDescription": "Adventure has begun!"
},
"alert":{
"title":"David is on an adventure!",
"body":"David found a sword!",
"sound":"chime.aiff"
}
}
},
"options": {
"apns_production": false
}
}
// 远程更新实时活动
{
"cid": "8103a4c628a0b98974ec1949-711261d4-5f17-4d2f-a855-5e5a8909b26e",
"platform": ["ios"],
"audience": {
"live_activity_id": "abcdef" // 更新或者结束实时活动,audience 必须且只能指定 live_activity_id 进行
},
"live_activity": {
"ios": {
"event": "update",
"content-state":{
"key":"value"
},
"alert":{
"title":"David is on an adventure!",
"body":"David found a sword!",
"sound":"chime.aiff"
},
"dismissal-date": 1168364460
}
},
"options": {
"apns_production": false
}
}
// 远程创建实时活动
{
"cid": "7094b4c628a0b98974ec1949-711261d4-5f17-2f6d-a855-9b26e5e5a890",
"platform": ["ios"],
"audience": {
"tag": [ "深圳", "广州"] // 创建实时活动,audience 支持:广播、tag、alias、registration_id
},
"live_activity": {
"ios": {
"event": "start",
"content-state":{
"currentHealthLevel": 100,
"eventDescription": "Adventure has begun!"
},
"attributes-type": "AdventureAttributes",
"attributes":{
"currentHealthLevel": 100,
"eventDescription": "Adventure has begun!"
},
"alert":{
"title":"David is on an adventure!",
"body":"David found a sword!",
"sound":"chime.aiff"
}
}
},
"options": {
"apns_production": false
}
}
This code block is shown in the floating window
sms_message:Short message
Kind tips:
1. Using SMS service will generate additionalcarriersFees, please contact the business for details, contact number:400-888-2376
2. The text message consists of two parts: signature and body content. answercarriersRegulations, signatures and text content need to be reviewed, reference Glossary 。
3. Signature settings reference Signature Settings in "Console Operation Guide" and SMS signature API 。
4. since 2018 Starting from March 2020, developers of SMS supplements must submit text content templates, which can be used after approval. Therefore, you need to fill in the temp_id(If the template has setting parameters, you need to fill them in. temp_para),refer to Template Settings in "Console Operation Guide" and SMS template API 。
| Keywords | type | Options | illustrate |
|---|---|---|---|
| title | string | Optional | Show toApple Watchmessage title. |
| body | string | Optional | Show toApple Watchmessage content. |
| sound | string | Optional | beep. |
- iOS Real-time activity news (Live Activity) JPush To be forwarded to Apple servers. Apple requires real-time activity messages (ActivityKit) The size of dynamic update data pushed remotely does not exceed 4096 byte.
- JPush Because it is necessary to reassemble the packets and consider a little security redundancy, it is required "live_activity"Parameter body"iOS":{ } and the overall length within the curly braces must not exceed:3584 bytes.JPush use utf-8 Encoding, so a Chinese character occupies 3 bytes in length.
// 远程更新实时活动
{
"cid": "8103a4c628a0b98974ec1949-711261d4-5f17-4d2f-a855-5e5a8909b26e",
"platform": ["ios"],
"audience": {
"live_activity_id": "abcdef" // 更新或者结束实时活动,audience 必须且只能指定 live_activity_id 进行
},
"live_activity": {
"ios": {
"event": "update",
"content-state":{
"key":"value"
},
"alert":{
"title":"David is on an adventure!",
"body":"David found a sword!",
"sound":"chime.aiff"
},
"dismissal-date": 1168364460
}
},
"options": {
"apns_production": false
}
}
// 远程创建实时活动
{
"cid": "7094b4c628a0b98974ec1949-711261d4-5f17-2f6d-a855-9b26e5e5a890",
"platform": ["ios"],
"audience": {
"tag": [ "深圳", "广州"] // 创建实时活动,audience 支持:广播、tag、alias、registration_id
},
"live_activity": {
"ios": {
"event": "start",
"content-state":{
"currentHealthLevel": 100,
"eventDescription": "Adventure has begun!"
},
"attributes-type": "AdventureAttributes",
"attributes":{
"currentHealthLevel": 100,
"eventDescription": "Adventure has begun!"
},
"alert":{
"title":"David is on an adventure!",
"body":"David found a sword!",
"sound":"chime.aiff"
}
}
},
"options": {
"apns_production": false
}
}
Kind tips:
1. Using SMS service will generate additionalcarriersFees, please contact the business for details, contact number:400-888-2376
2. The text message consists of two parts: signature and body content. answercarriersRegulations, signatures and text content need to be reviewed, reference Glossary 。
3. Signature settings reference Signature Settings in "Console Operation Guide" and SMS signature API 。
4. since 2018 Starting from March 2020, developers of SMS supplements must submit text content templates, which can be used after approval. Therefore, you need to fill in the temp_id(If the template has setting parameters, you need to fill them in. temp_para),refer to Template Settings in "Console Operation Guide" and SMS template API 。
Developers need to first compare the user’s mobile phone number with the device’s registrationID match. Binding method: Server-Device-Update device 、Android API-Set mobile number 、 iOS API-Set mobile number 、 HarmonyOS API-Set mobile number 。
SMS reissue
Within the time specified by the developer, determine whether the push is successful. If the success criteria are not met, a new text message will be sent.
- JiguangThe channel takes actual delivery as push success.
- JiguangThe background can set the criteria for judging the success of the manufacturer channel and support selection. api The call is successful, all reissues, no reissues, and delivery receipts are available. contact business Change conditions. If not selected, the default will be based on successful submission to the vendor server.
- api The call is successful: withJiguangCall manufacturer push api Success is the benchmark. If the call is successful, it will not be reissued.
- Reissue all: All the manufacturer’s channel devices will reissue SMS messages.
- No resend: Do not resend text messages to the manufacturer's channel device at all.
- Delivery receipt: Based on the manufacturer's delivery receipt (if the channel has a delivery receipt), no reissue will be issued if there is a delivery receipt.
- set up delay_time is a non-zero value, see for details SMS parameter description。
Concurrent SMS
JPushSupports sending push notifications and text messages at the same time.API When pushing delay_time Set to 0, see for details SMS parameter description。
SMS parameter description
use sms_message Set the SMS push content and the delay time for SMS sending. with original JSON The business protocol matches, and the message has the following field information:
| Keywords | type | Options | illustrate |
|---|---|---|---|
| delay_time | int | Required | Delay time for sending SMS. If push is not successful within the set time, SMS will be sent. |
| signid | int | Optional | Signature ID. If this field is empty, the application default signature will be used. |
| temp_id | long | Required | The content template ID of SMS supplement. If this field is not filled in, it means that the SMS supplement function is not used. |
| temp_para | JSON | Optional | SMS templateparameters in. |
| active_filter | boolean | Optional | active_filter This field is used to control whether active filtering is performed on users who send additional text messages. |
options: Optional parameter
Push options.
Currently it includes the following options:
| Keywords | type | Options | meaning | illustrate |
|---|---|---|---|---|
| sendno | int | Optional | Push serial number | |
| time_to_live | int | Optional | Offline message retention time (seconds) | |
| override_msg_id | long | Optional | Message ID to overwrite | If the current push is to overwrite the previous push, fill in the previous push here. msg_id There will be an overlay effect, that is: |
| apns_production | boolean | Optional | APNs Is it a production environment? | This field is only for iOS of Notification Valid. If not specified, it will be pushed to the production environment. Notice:JPush Server SDK The default setting is to push the "development environment". |
| apns_collapse_id | string | Optional | renew iOS Notification identifier | |
| big_push_duration | int | Optional | Fixed speed push duration (minutes) | |
| third_party_channel | JSON Object | Optional | Push request delivery channel | It is only valid for users who have configured the manufacturer. For details, please refer to third_party_channel illustrate 。 |
| classification | int | Optional | Message type classification | JiguangThe specified message type will not be judged or calibrated, and will be adapted to the message type specified by the developer. Android Manufacturer channel. If left blank, the default value is 0. |
| target_event | JSON Array | Optional | Goal conversion event | Goal conversion events support passing "custom events" and "JiguangPreset event", currently supportedAndroidandiOSPlatform (requiresJPush SDK ≥ 5.0.0,andJCore ≥ 4.2.0), supporting two message types: notification messages and in-app messages. |
| test_message | boolean | Optional | Whether to test message identification | priority greater than hmos Notify the body test_message Field (also adapted to Hongmeng custom messages, if you push Hongmeng custom messages, please pass this field) |
| receipt_id | string | Optional | Receipt ID | priority greater than hmos Notify the body receipt_id Field (also adapted to Hongmeng custom messages, if you push Hongmeng custom messages, please pass this field) |
| active_push | boolean | Optional | Whether to use bright screen push | true-Use bright screen push,false-Do not use bright screen push, default valuefalse。 |
| need_backup | boolean | Optional | Use the bright screen push strategy | true-Use the bright-screen cover-up strategy,false-Do not use the bright screen cover-up strategy, the default valuefalse。 For example, push this message at 8 a.m. and set the offline time for 2 hours. exist 8:00 - 10:00 Within the time limit, when the device's screen turns on, it will trigger the message to be sent. Remaining unsent users, upon arrival10:00back,0-5 The remaining messages within minutes will be distributed through the manufacturer channel. |
| business_operation_code | string | Optional | Push plan ID | You need to create a plan identification value first. Please refer to the creation steps.Push plan document。 |
| test_model | boolean | Optional | Whether to push in test mode | |
| notification_3rd_ver | string | Optional | Customized message to manufacturer notification function version | |
| auto_truncation | bool | Optional | Whether the manufacturer channel message is automatically truncated if it is too long? |
|
| mkt_enable | bool | Optional | situational businessPush |
|
Message Classification Description
- options.classification: Message type classification, 0-represents operational messages, 1-represents system messages, default value 0.
- JiguangBy default, the platform determines the message type based on the value of this field, and performs vendor quota deduction processing and vendor message classification adaptation logic.
- This field has the highest priority.JiguangThe specified message type will not be judged or calibrated, and will be adapted with the value of this field specified by the developer. Android Vendor channel message classification function, please make sure options.classification The value is accurate. For example: will cover options.third_party_channel.vivo.classification The set value will be overwritten options.third_party_channel.honor.importance Set value, etc.
- For the manufacturer’s adaptation and usage methods, please refer to:Vendor Message Classification Usage Guide Reference
Bright screen push instructions
options.active_push: Whether to use bright screen push,true-Use bright screen push,false-Do not use bright screen push, default valuefalse。
- It is suitable for marketing messages with low real-time requirements. It is not recommended for messages with high real-time requirements.
- When using bright screen push, it is recommended to set it at the same timeneed_backup=true。
- This function only supports simple notification messages, and does not support custom messages or notification + custom message push, otherwise the request will be returned code code 1035。
- This function does not support fixed-speed push, otherwise the request will be returned code code 1035。
- The time range supported by bright screen push is every day 7:00 - 22:00
- Bright screen push forAndroidThe delivery strategy for manufacturer users is fixed to go online.Jiguang, go to the manufacturer offline. (If there are developers who specify their own strategies issued by manufacturers, please pay attention. When using bright screen push, you do not need to specify a strategy, or you must specify it assecondary_push)
- This function is a value-added paid service and requires additional application permissions. You canContact Business Consulting。
options.need_backup:Whether to use the bright-screen push cover-up strategy?true-Use the bright-screen cover-up strategy,false-Do not use the bright screen cover-up strategy, the default valuefalse。
- If this field is specified astrue,butactive_pushField value must betrue。
- Whether to use the cover-up strategy is mainly to confirm the processing logic after the offline message expires.
- When using the cover-up policy to deliver: If it is a manufacturer user (after the offline message expires 0-5 Delivered through the manufacturer channel within minutes), if it is a non-manufacturer user (after the offline message expires, it will be delivered directly if the user is online; if the user is offline, it will be discarded).
For example, push this message at 8 a.m. and set the offline time for 2 hours. exist 8:00 - 10:00 Within the time limit, when the device's screen turns on, it will trigger the message to be sent. Remaining unsent users, upon arrival10:00back,0-5 The remaining messages within minutes will be distributed through the manufacturer channel. - When delivering without using the cover-up policy: Offline messages that are not delivered after expiration will be discarded directly, regardless of whether they are manufacturer users or not.
situational businessPush illustrate
1. Background: Various domestic manufacturers have strictly classified and managed messages and implemented differentiated quota control. For example, in most cases, the limit for marketing messages is 2 messages/device/application/day, which has a direct impact. APP Business-critical message push affects user behavior link conversion.
2. Based on the above background,JiguangAt present, we have reached in-depth commercial cooperation with some manufacturers, and enjoy the privilege of increasing the payment limit, breaking through the system's default operating message push limit, achieving unlimited access to key marketing nodes, and ensuring that key information reaches target users.
3. This function is a value-added paid service and requires additional application permissions. You can Contact Business Consulting 。
Usage steps:
- Step 1:
Need to enter【JiguangConsole]-[Message Push]-[Push Settings]-[Integration Settings]-[Android】Page, synchronization is enabled. Vendor operation exceeds the limit and goes to business.PushChannel delivery function.

Special note: If the value does not exceed the above configuration, it is free.PushThe channel is issued; if it exceeds the configured value, it will be commercialized.PushChannel distribution; it is recommended to follow the manufacturer's instructions APP The actual quota allocation, and if the quota exceeds the quota, it will be commercialized, which can not only ensure delivery to the maximum extent, but also save costs to the maximum extent.
- Step 2: Push API Specify options.mkt_enable situational business Push field value,true-Use case businessPushability,false-Do not use situational businessPushcapabilities, defaultfalse。
Test Mode Description
- options.test_model: Whether to push in test mode,false: Official mode push message (default value),true: Test mode push message
- Test mode push messages are only pushed to the test device; please refer to the documentation for functional logic:test mode。
- Please pay attention to distinguish the difference options.test_message Fields: options.test_message It is only used to adapt to the manufacturer's test message function, and does not mean that it is pushed in test mode; options.test_model It means that the request is inJiguangWhen the platform delivers the message, it has been controlled whether the message is only delivered to the test device.
- This function is a value-added paid service and requires additional application permissions. You canContact Business Consulting。
third_party_channel illustrate
options.third_party_channel: key Only supports xiaomi、huawei、honor、meizu、oppo、vivo、fcm 、asus、hmostype user. key Can exist for one or more of the above 10 types at the same time, not passed key The corresponding manufacturer delivers the default delivery logic.
- Special Note 1: If specified fcm typekey, the allow delivery policy field hasdistribution、distribution_fcm,「distribution” field is for pureGoogleSystem device (the device can only getfcm token),「distribution_fcm” field is for Google + Domestic manufacturer combination system (equipment can be obtainedfcm token, you can also get domesticAndroidManufacturertoken); and specify the policy for notification messages (notification) and custom messages (message) are effective.
- Special Note 2: If specified hmos typekey, the delivery policy field allowed is onlydistribution,「distribution"The value range of the field is explained as follows; and distribution Field for Hongmeng platform notification message (notification) and custom messages (message) are effective; when no message delivery strategy is specified, the default strategy isfirst_ospush。
Default delivery logic
- Free users:distribution The default value is secondary_push,distribution_fcm The default value is secondary_fcm_push。
- VIP user:distribution The default value is first_ospush,distribution_fcm The default value is fcm。
Manufacturer type KEY The corresponding 3 strategy parameters are as follows:
| Keywords | type | Options | meaning | illustrate |
|---|---|---|---|---|
| distribution | string | Optional | Notification bar message delivery logic | The value cannot be an empty string. |
| distribution_fcm | string | Optional | Notification bar message fcm+ Domestic manufacturer combination type issuance logic | The value cannot be an empty string. |
| distribution_customize | string | Optional | Custom message domesticAndroidVendor type delivery logic | define domesticAndroidThe logic for vendor-type users to issue custom messages. This function only supports huawei、honor channel, required Android push SDK≥V3.9.0。 ⚠️Note: Xiaomi pushed on2022The service of transmitting transparent messages will stop at 0:00 on September 12, 2020. At that time, you will not be able to send transparent messages through Xiaomi channels. Please pay attention to adjusting the distribution strategy. For details, see Xiaomi official announcement 。 |
Different types of manufacturers KEY The following attribute parameters can exist:
| Keywords | type | Options | meaning | illustrate |
|---|---|---|---|---|
| channel_id | string | Optional | Notification bar message classification | |
| skip_quota | boolean | Optional | Quota Judgment and Deduction | Whether to skip quota judgment and deduction is currently only available for Xiaomi and oppo Valid, default is false。 |
| classification | int | Optional | Notification bar message classification | vivo The notification bar message classification of the mobile phone manufacturer. If left blank, the default value is 0. at present vivo The classification of system messages is relatively strict. For specific rules, please refer to:vivo。 about classification and skip_quota Field description: |
| push_mode | int | Optional | Notification bar message type | correspond vivo of pushMode field, defaults to 0 if not filled in. For details, please refer to:vivo pushMode。 |
| importance | string | Optional | Intelligent classification of Huawei and Honor notification bar messages | In order to adapt to the intelligent classification of notification bar messages of Huawei and Honor mobile phone manufacturers, it corresponds to Huawei/Honor's "Cloud Notification"importance If the field is not filled in, it will not be issued. Reference: Intelligent classification of Huawei notification messages 、 Honor notification message classification standards。 |
| category | string | Optional | Huawei,vivo、OPPO Vendor message scene identifier | In order to adapt to Huawei,vivo、OPPO Mobile phone manufacturer messages are used to identify the "Cloud Notification" message type, determine the message reminder method, and speed up the sending of specific types of messages. |
| notify_level | int | Optional | OPPONotification bar message reminder level | |
| sound | string | Optional | Huawei custom ringtone | |
| default_sound | boolean | Optional | Huawei default ringtone control switch | Huawei officially explains that it will push apps for the first time Services and communications carry with you sound field and default_sound The value is set to false. Note: Since the ringtone is a property of the notification channel, the ringtone is only used when the channel is first created (settings sound) is valid and cannot be modified later. |
| urgency | string | Optional | Huawei manufacturer-defined message priority | In order to adapt to the priority of customized messages by Huawei mobile phone manufacturers. set up"HIGH"You need to apply for special permissions from Huawei, please refer to: How to apply for special permissions 。 |
| receipt_id | string | Optional | Huawei receipt ID | |
| callback_id | string | Optional | vivoReceipt ID | |
| target_user_type | int | Optional | Huawei/Honor message type | Only valid for Huawei and Honor channels. Each Huawei app can send this test message every day 500 not subject to Huawei’s daily push limit requirements for a single device 。 Each Honor app can send this test message every day 1000 not subject to Honor’s daily push limit requirements for a single device 。 |
| large_icon | string | Optional | Manufacturer news large icon style | |
| small_icon_uri | string | Optional | Manufacturer message small icon style | |
| small_icon_color | string | Optional | Xiaomi manufacturer small icon style color | Xiaomi from 2023.08 The function of dynamically setting small icons, right icons, and large pictures during push is no longer supported. Developers can no longer set this field value. |
| style | int | Optional | Manufacturer message large text /inbox/ large picture style | Used to specify the manufacturer's notification bar style type,JPush Android SDK v3.9.0 This field is only supported in versions above and defaults to 0. |
| big_text | string | Optional | Manufacturer message large text style | |
| inbox | JSONObject | Optional | Manufacturer news inbox style | |
| big_pic_path | string | Optional | Manufacturer big_pic_path | |
| only_use_vendor_style | boolean | Optional | Whether to use its own channel to set the style | Whether to only use the style set by its own channel or not android The style set inside, the default is false,JPush Android SDK v3.9.0 This field is only supported in versions above. |
| auditResponse | JSONObject | Optional | Based on third-party audit results | Currently supports Huawei / OPPO / vivo Manufacturer. |
| private_msg_template_id | string | Optional | Private message template id | Currently only supports OPPO Manufacturer. It must be carried when delivering the corresponding private message template. Customization is not supported. For details, see:OPUSHPrivate message template verification capability access instructions |
| private_title_parameters | JSONObject | Optional | Title template fill parameters | Currently supported OPPO Manufacturer. Example: The private message template id title template is: Welcome to $ {city} $ ,$ {city} $ Welcome. The content of this parameter is: {"city":"Beijing"}. For details, see:OPUSHPrivate message template verification capability access instructions |
| private_content_parameters | JSONObject | Optional | Content template fill parameters | Currently supported OPPO Manufacturer. Example: The content template corresponding to the private message template id is: Welcome $ {userName} $ comes to $ {city} $。 The content of this parameter is: {"userName":"Tom","city":"Shenzhen City"}. For details, see:OPUSHPrivate message template verification capability access instructions |
| mi_template_id | string | Optional | Private message template id | Currently only supports XiaoMI Manufacturer. When delivering all private message notifications, both channel_id and mi_template_id must be passed simultaneously. For details: refer to Xiaomi’s update notice regarding the new regulations for message template push. |
| mi_template_param | string | Optional | Content template fill parameters | Currently only supports XiaoMI Manufacturer. The value shall be a JSON string of message template parameters. Example: '{"app_name":"Xiaomi Mall","order_no":"XM202601130001","order_amount":"11.00","delivery_time":"2026-01-15 18:00"}'. For details: Xiaomi Message Template Access Guide. |
| badge_operation_type | int | Optional | Digital corner mark operation type |
0: coverage 1: increase |
| badge_message_count | int | Optional | Set the number of numeric markers | Currently supported OPPO Manufacturer. 0: Clear digital markers (requires settingbadge_operation_type=0 (override) operation type) 1-99: Display the corresponding numeric corner mark greater than99: show99+ badge_operation_typeWhen set to 1, this field does not need to be passed, the default is +1 |
| add_badge | bool | Optional | Whether to display the badge |
This field is passed transparently tovivoFor the manufacturer channel, you need to apply for permission from the manufacturer. After setting, the corner mark will automatically increase by 1. For details, see:How to set desktop corner icon - VpushAccess method |
| hw_push_type | int | Optional | Huawei push type |
If you want to use live window notification, please set hw_push_type=7, and meet the following conditions at the same time: 1. Provide valid hw_live_payload fields, as described below; 2. Setting options.classification=1; 3. Set the sending strategy to ospush(or not specified, defaults to ospush) |
| hw_live_payload | JSONObject | Optional | Huawei live window message body |
|
| op_push_type | int | Optional | OPPOPush type |
1. Provide valid voip_extraData fields, as described below; 2. Setting options.classification=1; 3. Set the sending strategy to ospush(or not specified, defaults to ospush) 4. In addition, push OPPO voip No need to carry it notification,message Wait for message content top-level fields; if not deliveredalertfields,JiguangThe server will automatically notification.android.alert Assign a null value to ensure compatibility. |
| op_intelligent_intent | JSONObject | Optional | Intent shared data structure |
1. Setting options.classification=1; 2. Set the sending strategy to ospush(or not specified, defaults to ospush)。 |
| op_delete_intent_data | JSONObject | Optional | Remove intent sharing |
1. Setting options.classification=1; 2. Set the sending strategy to ospush(or not specified, defaults to ospush)。 |
| vivo_push_type | int | Optional | vivoPush type |
1. Provide valid vivo_inapp_msg fields, as described below; 2. Setting options.classification=1; 3. Set the sending strategy to ospush(or not specified, defaults to ospush) 4. In addition, push vivoIt is not necessary to carry the message when transmitting it transparently. notification,message Wait for message content top-level fields; if not deliveredalertfields,JiguangThe server will automatically notification.android.alert Assign a null value to ensure compatibility. 1. Provide valid voip_extraData fields, as described below; 2. Setting options.classification=1; 3. Set the sending strategy to ospush(or not specified, defaults to ospush) 4. In addition, push vivo voip No need to carry it notification,message Wait for message content top-level fields; if not deliveredalertfields,JiguangThe server will automatically notification.android.alert Assign a null value to ensure compatibility. |
| vivo_inapp_msg | JSONObject | Optional | vivoTransparent message body |
1. Setting options.classification=1; 2. Set the sending strategy to ospush(or not specified, defaults to ospush)。 |
| honor_push_type | int | Optional | Honor push type |
1. Provide valid voip_extraData fields, as described below; 2. Setting options.classification=1; 3. Set the sending strategy to ospush(or not specified, defaults to ospush) 4. In addition, push Honor voip No need to carry it notification,message Wait for message content top-level fields; if not deliveredalertfields,JiguangThe server will automatically notification.android.alert Assign a null value to ensure compatibility. |
| mi_push_type | int | Optional | Xiaomi push type |
1. Provide valid voip_extraData fields, as described below; 2. Setting options.classification=1; 3. Set the sending strategy to ospush(or not specified, defaults to ospush) 4. Must be set options.third_party_channel.xiaomi.channel_id field value; 5. In addition, push Xiaomi voip No need to carry it notification,message Wait for message content top-level fields; if not deliveredalertfields,JiguangThe server will automatically notification.android.alert Assign a null value to ensure compatibility. |
| voip_extraData | string | Optional | voipmessage body |
1. Provide valid voip_extraData fields, as described below; 2. Setting options.classification=1; 3. Set the sending strategy to ospush(or not specified, defaults to ospush) 4. In addition, push voip No need to carry it notification,message Wait for message content top-level fields; if not deliveredalertfields,JiguangThe server will automatically notification.android.alert Assign a null value to ensure compatibility. |
| extensionExpireShow | boolean | Optional | vivo voipMessage specific fields | This field is only usedvivo voipmessage properties,JiguangTransparent transmission manufacturer, specific characteristics are subject to the manufacturer, refer to the manufacturer's documentation:VoIP Service Kit Message。 |
Examples of parameters for each manufacturer:
"third_party_channel":{
"xiaomi":{
"distribution":"jpush",
"channel_id":"*******",
"big_text":"testbigtext", // 可选,最多支持 128 个字符,配合小米 style 使用
"style":1,
"distribution_fcm":"fcm",
"skip_quota": true
},
"huawei":{
"distribution":"secondary_push",
"distribution_fcm":"jpush",
"distribution_customize":"first_ospush",
"sound":"/raw/shake",
"default_sound":false,
"importance":"NORMAL",
"receipt_id":"111111",
"target_user_type":1,
"large_icon":"jgmedia-2-14b23451-0001-41ce-89d9-987b465122da",
"small_icon_uri":"jgmedia-3-14b23451-0001-41ce-89d9-987b465122da",
"inbox": {}, //可选,配合华为 style 使用
"style":2,
"only_use_vendor_style":true,
"auditResponse":{
"code": 200,
"msg": "ok",
"data": {
"auditId": "44e3d69684a348c99cbc68xxxxx",
"auditEngine": "zx",
"labels": [{
"level": 1,
"reason": "VULGAR",
"words": "***违禁内容***"
}],
"remark": ""
},
"sign": "MEUCIQC40lsywwqGK/DIl9y6XM9KcoMWVoToJblMZzj1fbjEdQIg********"
}
},
"honor":{
"distribution":"secondary_push",
"distribution_fcm":"jpush",
"distribution_customize":"first_ospush",
"large_icon":"jgmedia-2-14b23451-0001-41ce-89d9-987b465122da",
"small_icon_uri":"jgmedia-3-14b23451-0001-41ce-89d9-987b465122da",
"style":1
},
"meizu":{
"distribution":"jpush",
"distribution_fcm":"pns"
},
"fcm":{ // 这个参数不支持 distribution_fcm 字段
"distribution":"jpush"
},
"oppo":{
"distribution":"ospush",
"channel_id":"*******",
"distribution_fcm":"secondary_fcm_push",
"large_icon":"jgmedia-2-14b23451-0001-41ce-89d9-987b465122da",
"big_pic_path":"jgmedia-1-14b23451-0001-41ce-89d9-987b465122da",
"style":1,
"skip_quota": true,
"auditResponse":{
"code": 200,
"msg": "ok",
"data": {
"auditId": "44e3d69684a348c99cbc68xxxxx",
"auditEngine": "zx",
"labels": [{
"level": 1,
"reason": "VULGAR",
"words": "***违禁内容***"
}],
"remark": ""
},
"sign": "MEUCIQC40lsywwqGK/DIl9y6XM9KcoMWVoToJblMZzj1fbjEdQIg********"
},
"private_msg_template_id":"dfudyer0088", //2025.07.14新增
"private_title_parameters":{ //2025.07.14新增
"level": "normal",
"name": "LGAR"
},
"private_content_parameters":{ //2025.07.14新增
"key01": "value01",
"key02": "value02"
}
},
"vivo":{
"distribution":"jpush",
"classification": 0,
"distribution_fcm":"secondary_pns_push",
"push_mode":0,
"auditResponse":{
"code": 200,
"msg": "ok",
"data": {
"auditId": "44e3d69684a348c99cbc68xxxxx",
"auditEngine": "zx",
"labels": [{
"level": 1,
"reason": "VULGAR",
"words": "***违禁内容***"
}],
"remark": ""
},
"sign": "MEUCIQC40lsywwqGK/DIl9y6XM9KcoMWVoToJblMZzj1fbjEdQIg********"
}
},
"hmos":{ // 这个参数只支持distribution字段,下发策略对鸿蒙平台通知(notification)和鸿蒙平台自定义消息(message)均生效
"distribution":"jpush"
}
}
// 华为实况窗通知示例
"third_party_channel":{
"huawei":{
"distribution":"os_push",
"receipt_id":"111111",
"hw_push_type":7, // 实况窗必须知道值为7
"hw_live_payload": { // 对应华为 LiveNotificationPayload 字段:https://developer.huawei.com/consumer/cn/doc/HMSCore-References/rest-live-0000001562939968#section13271045101216
"activityId": 15,
"operation": 1,
"event": "TAXI",
"title": "行程已开始",
"content": "距目的地 7.2公里 | 预计27分钟",
"activityData": {
"notificationData": {
"type": 3,
"largeIcon": "icon",
"iconOverlay": true,
"contentTitle": "行程已开始",
"contentText": [
{
"text": "距目的地 "
},
{
"text": "7.2公里",
"foregroundColor": "#FFED8C4A"
},
{
"text": " | 预计 "
},
{
"text": "27分钟",
"foregroundColor": "#FFED8C4A"
}
],
"clickAction": {
"actionType": 1,
"legacy": {
"uri": "#Intent;launchFlags=0x10000000;action=android.intent.action.gtpush;package=com.xxxxxxxend"
}
},
"richProgress": {
"type": 0,
"nodeIcons": ["icon1", "icon2"],
"indicatorIcon": "/res/raw/icon3",
"progress": 40
}
},
"capsuleData": {
"type": 3,
"status": 1,
"icon": "icon",
"bgColor": "#FFED8C4A",
"remind": true,
"title": "行程中",
"content": "预计27分钟"
}
}
}
}
}
// OPPO流体云消息示例
// 意图共享参数(也就是创建流体云消息)
"third_party_channel":{
"oppo":{
"distribution":"ospush",
"op_intelligent_intent":{
// 略,详见 OPPO 官方文档意图共享数据结构字段 IntelligentIntent 说明:https://open.oppomobile.com/documentation/page/info?id=13565
}
}
}
// 删除意图参数(也就是删除流体云)
"third_party_channel":{
"oppo":{
"distribution":"ospush",
"op_delete_intent_data":{ // 对应 OPPO 官方文档删除意图数据结构 data 字段:https://open.oppomobile.com/documentation/page/info?id=13578
"intentName": "Example.Progress",
"entityIds": ["12345"],
"serviceId": {
"launcher": "999800001"
}
}
}
}
// vivo透传消息体
"third_party_channel":{
"vivo":{
"distribution":"ospush",
"vivo_inapp_msg":{
"content":"{\"saId\":\"20000067\",\"url\":\"https://render.alipay.com/p/h5/app/www/home.html?chInfo=push0115\",\"showTitleBar\":\"NO\"\"showToolBar\":\"YES\",}",
"popUpContent":"成功收款 0.01 元。享免费提现等更多专属服务,点击查看",
"popUp": true
}
}
}
// 各厂商voip消息示例
"third_party_channel":{
"huawei":{
"importance": "HIGH", // 建议传递
"category":"VOIP", // 华为voip消息必须传递
"receipt_id":"*****" // 可选
}
"honor":{
"honor_push_type":3, // 荣耀voip消息必须传递
"voip_extraData":"voip data" // 荣耀voip消息必须传递
},
"xiaomi":{
"mi_push_type":3, // 小米 voip消息必须传递
"channel_id":"*******", // 小米voip消息必须传递
"callback_id":"*******", // 可选
"voip_extraData":"voip data" // 小米voip消息必须传递
},
"oppo":{
"op_push_type":3, // OPPO voip消息必须传递
"callback_id":"*******", // 可选
"voip_extraData":"voip data" // OPPO voip消息必须传递
},
"vivo":{
"vivo_push_type":3, // vivo voip消息必须传递
"callback_id":"*******", // 可选
"voip_extraData":"voip data" // vivo voip消息必须传递
"extensionExpireShow": true //可选
}
}
callback: callback parameters
Push API When making a request, you can specify callback Parameters to facilitate users to temporarily change callbacks URL Or the callback can bring its own custom parameters to meet its daily business needs.
This feature is only forJiguang VIP Provided by users, mainly provides message delivery and click receipt data.
If you need to activate this function, please contact:Business customer service
Example:
{
"platform":"all",
"audience":"all",
"notification":{
"alert":"Hi, JPush"
},
....
"callback": {
"url":"https://***", // 可选字段;
"params":{ // 可选
"name":"joe",
"age":26
},
"type":3 // 可选,详细枚举值参考下述表格说明
}
}
callback Contains the following fields:
| Keywords | type | Options | meaning |
|---|---|---|---|
| url | string | Optional | Data temporary callback address. |
| params | JSON Object | Optional | Custom parameters that need to be called back to the user |
| type | int | Optional | Callback data type. If not specified, which receipt program is activated by the application will give which receipt by default; if specified, the actual specified receipt type will be used. The specific enumeration value meaning: |
notification_3rd:Customized message to manufacturer notification
Push API When initiating a push request of a custom message type, for Android、iOS、HarmonyOS device if APP If the long connection is not online, messages cannot be delivered in time; in this case,JiguangLaunched the function of “customized messages to manufacturer notifications”.
In other words, for some important customized messages for users, you can apply for activationJiguang VIP Manufacturer channel function, after opening, pass APP Messages that cannot be delivered in time when the long connection is offline can be delivered through the manufacturer channel and displayed in the form of manufacturer notifications to remind users in a timely manner.JiguangThere will be deduplication processing internally, so you don’t have to worry about repeated message delivery.
If you need to activate this function, please contact:Business customer service
Special Note: Using the custom message to manufacturer notification function, you can directly connect to the latest v2 version. Please see the code example for the differences in parameters and functions between v1 and v2 versions.
v2 version example (recommended):
{ "platform":"all", "audience":"all", "message":{ "msg_content": "Hi,JPush" }, "notification_3rd": { // 同 notification 下的 android、ios、hmos 参数 "android": { "alert": "Hi, JPush!", "title": "Send to Android", "builder_id": 1, "large_icon": "http://www.jiguang.cn/largeIcon.jpg", "intent": { "url": "intent:#Intent;component=com.jiguang.push/com.example.jpushdemo.SettingActivity;end" }, // ...其它Android notification可支持参数... "extras": { "newsid": 321 } }, "ios": { "alert": "Hi, JPush!", "sound": "default", "badge": "+1", "thread-id": "default", // ...其它ios notification可支持参数... "extras": { "newsid": 321 } }, "hmos" : { "alert":"hmos alert", "title":"hmos titile", "intent": { "url":"scheme://test?key1=val1&key2=val2" }, "badge_add_num":1, "badge_set_num":1, // ...其它hmos notification可支持参数... "extras": { "age":18 }, "category":"IM", "test_message":false, "receipt_id":"abc1212", "large_icon":"https://www.jiguang.cn/largeIcon.jpg", "style":0, "push_type": 0 } }, "options": { "notification_3rd_ver": "v2" // 需特别注意此字段,自定义消息转厂商通知功能版本,v2版本必须指定此字段值 } }{ "platform":"all", "audience":"all", "message":{ "msg_content": "Hi,JPush" }, "notification_3rd": { // 同 notification 下的 android、ios、hmos 参数 "android": { "alert": "Hi, JPush!", "title": "Send to Android", "builder_id": 1, "large_icon": "http://www.jiguang.cn/largeIcon.jpg", "intent": { "url": "intent:#Intent;component=com.jiguang.push/com.example.jpushdemo.SettingActivity;end" }, // ...其它Android notification可支持参数... "extras": { "newsid": 321 } }, "ios": { "alert": "Hi, JPush!", "sound": "default", "badge": "+1", "thread-id": "default", // ...其它ios notification可支持参数... "extras": { "newsid": 321 } }, "hmos" : { "alert":"hmos alert", "title":"hmos titile", "intent": { "url":"scheme://test?key1=val1&key2=val2" }, "badge_add_num":1, "badge_set_num":1, // ...其它hmos notification可支持参数... "extras": { "age":18 }, "category":"IM", "test_message":false, "receipt_id":"abc1212", "large_icon":"https://www.jiguang.cn/largeIcon.jpg", "style":0, "push_type": 0 } }, "options": { "notification_3rd_ver": "v2" // 需特别注意此字段,自定义消息转厂商通知功能版本,v2版本必须指定此字段值 } }This code block is shown in the floating windowExample of v1 version (new function fields will no longer be expanded and the status quo will only be maintained. It is recommended to switch to v2 version):
{ "platform":"all", "audience":"all", "message":{ "msg_content": "Hi,JPush" }, "notification_3rd": { "content": "Hi,JPush", "title": "msg", "channel_id": "channel001", "uri_activity": "cn.jpush.android.ui.OpenClickActivity", "uri_action": "cn.jpush.android.intent.CONNECTION", "badge_add_num": 1, "badge_set_num": 1, "badge_class": "com.test.badge.MainActivity", "sound": "sound", "extras":{ "news_id" : 134, "my_key" : "a value" } }, "options": { "notification_3rd_ver": "v1" // 不设置此字段,默认值v1 } }{ "platform":"all", "audience":"all", "message":{ "msg_content": "Hi,JPush" }, "notification_3rd": { "content": "Hi,JPush", "title": "msg", "channel_id": "channel001", "uri_activity": "cn.jpush.android.ui.OpenClickActivity", "uri_action": "cn.jpush.android.intent.CONNECTION", "badge_add_num": 1, "badge_set_num": 1, "badge_class": "com.test.badge.MainActivity", "sound": "sound", "extras":{ "news_id" : 134, "my_key" : "a value" } }, "options": { "notification_3rd_ver": "v1" // 不设置此字段,默认值v1 } }This code block is shown in the floating windowv2 version,notification_3rd The following fields can be supported (recommended):
| Keywords | type | Options | meaning |
|---|---|---|---|
| android | JSON Object | Optional | |
| ios | JSON Object | Optional | |
| hmos | JSON Object | Optional | |
- v1 version,notification_3rd The following fields can be supported (not recommended):
| Keywords | type | Options | meaning |
|---|---|---|---|
| title | string | Optional | |
| content | string | Required | |
| intent | JSON Object | Optional | use intent inside url Specify the target page to jump to after clicking the notification bar; 1. Jump to target page: intent:#Intent;action=action path;component= package name /Activity full name;end (OPPO and FCM The channel must pass "action Path", other manufacturers must pass "Activity Full name", otherwise there will be a problem that the corresponding manufacturer cannot be redirected) 2. Jump to deeplink address: scheme://test?key1=val1&key2=val2 3. Application home page: intent:#Intent;action=android.intent.action.MAIN;end (Fixed to this address) |
| uri_activity | string | Optional | |
| uri_action | string | Optional | |
| badge_add_num | int | Optional | Example:badge_add_num The value is 1, and the original subscript number is 2. After sending this subscript message, the applied subscript number is displayed as 3. |
| badge_set_num | int | Optional | |
| badge_class | string | Optional |
|
| sound | string | Optional | |
| channel_id | string | Optional | |
| extras | JSON Object | Optional | Extended fields; customize here JSON Formatted Key / Value Information for business use. |
- Instructions for use
- notification_3rd It only takes effect for users who have opened the manufacturer channel;
- notification and notification_3rd There cannot be content at the same time. If these two blocks have content at the same time, an error message will be returned;
- If using v1 version,notification_3rd The content of iOS、HarmonyOS The platform is invalid, only for Android The platform takes effect;
- If using v2 version,notification_3rd The content of iOS、HarmonyOS、Android The platform takes effect;
- notification_3rd is used to reissue the manufacturer's notice and can only be used when message This field is only allowed to be passed if the field contains content, and only when both are not empty, the notification of the manufacturer channel will be forwarded to the offline manufacturer device.
call returns
Return example
< HTTP/1.1 200 OK
< Content-Type: application/json
{
"sendno": "0",
"msg_id": "18100287008546343"
}
error code
| Code | describe | Detailed explanation | HTTP Status Code |
|---|---|---|---|
| 1000 | System internal error | Internal logic error on the server side, please try again later. | 500 |
| 1001 | Only supports HTTP Post method | Not supported Get method. | 405 |
| 1002 | Required parameters are missing | It must be corrected and check whether the required parameters are not written. | 400 |
| 1003 | Parameter value is illegal | It must be corrected. The parameters are illegal, such as:
|
400 |
| 1004 | Authentication failed | Must be corrected. examine Appkey and MasterSecret, please see:Call verification | 401 |
| 1005 | Message body is too large | Must be corrected.
|
400 |
| 1008 | app_key Illegal parameter | Correction is required, please carefully compare what you have posted Appkey Is it consistent with the application information? Is there any extra space? | 400 |
| 1009 | There are some push objects that are not supported key | Must be corrected, prompt: whether to content-available incorrectly written as content_available,builder_id incorrectly written as build_id;In addition to the fields specified in the document, you also need to pass custom key please extras Fill in. | 400 |
| 1011 | There is no push target that meets the conditions | 400 | |
| 1012 | Pushes matching the current conditions have exceeded the limit | 400 | |
| 1016 | Illegal parameter | 400 | |
| 1017 | Illegal parameter | This is usually caused by passing multiple mutually exclusive system channel parameter attributes. | 400 |
| 1018 | Illegal parameter | Check, please callback callback parameter specified URL Is thereJiguangOfficial website configuration. | 400 |
| 1019 | Illegal parameter | Check, please options.third_party_channel policy fields in distribution/distribution_custom/distribution_fcm Whether it matches the message type (notification/custom). | 400 |
| 1020 | Only supports HTTPS ask | must be corrected | 404 |
| 1030 | Internal service timeout | Try again later. If multiple retries fail, please contact support@jiguang.cn | 503 |
| 1031 | Illegal parameter | Real-time activity messages cannot be pushed at the same time as notification messages and custom messages. | 400 |
| 1033 | Illegal parameter | Goal conversions only support notification messages and in-app messages | 400 |
| 1035 | Illegal parameter | The parameters for bright screen push are incorrect. Possible reasons: |
400 |
| 1036 | Illegal parameter | Not hereJiguangWebPortalThis error is returned when the Hongmeng platform is enabled and only the Hongmeng platform is specified for push. | 400 |
| 2002 | API The frequency of calls exceeds the limit for the application | Notice API frequency control , can be contactedJiguangBusiness or technical support opens a higher API Call frequency. | 429 |
| 2003 | The application appkey has been restricted from calling API | Contact technical support to find out the cause of the restriction and for assistance. | 403 |
| 2004 | No permission to perform current operation | Must be corrected. current call API The source IP address is not in the IP whitelist of the application. Please configure the IP whitelist in the official website application settings. | 403 |
| 2005 | The amount of messages sent exceeds a reasonable limit. | It is detected that the cumulative amount of messages sent by the target user is too large and exceeds the reasonable usage range. You need to check the business logic or contact technical support. | 403 |
| 2006 | No VIP user. | Function only for VIP Open to users. | 403 |
| 2007 | No permission to call this interface/function. | Please contact the business to activate additional special interface/function usage rights. | 403 |
| 2008 | Broadcast push exceeds frequency limit | JiguangAt 2020/03/10 Limit the frequency of "broadcast push" and adjust it to 10 times per day. If you need a higher frequency, please contact the business. | 400 |
| 2009 | Push requests are restricted | |
400 |
| 2010 | Push requests are restricted | The push content contains black words, or the total push volume exceeds the limit. | 400 |
| 2011 | Push time window limit | The sending time is exceeded, please check theJiguang WebPortal Configured window of time allowed for push. | 400 |
Related references
- HTTP Return code:HTTP-Status-Code
- Get push delivery API:Report-API
- HTTP Specification reference:HTTP basic authentication
- Apple APNs specification:Apple Push Notification Service
- Microsoft MPNs specification:Push notifications for Windows Phone 8
- Limits on content pushed by each platform and each channel
| Manufacturer channel | title length | content length | Sensitive words | Other instructions |
|---|---|---|---|---|
| Jiguangaisle | No limit, but limit the total size of the message body | No limit, but limit the total size of the message body | Black words configured according to the security package function | Message body size limit reference FAQ。 |
| Huawei channel | No limit, but the total size of the message body < 4096 Bytes, recommended title < 40 characters | No limit, but the total size of the message body < 4096 Bytes, suggested content < 1024 characters | refer to Huawei Notice Content Management Rules | The default [Marketing Notification] permission is silent notification, and silent push has no sound, vibration and other prompts. |
| Glory Channel | No limit, but the total size of the message body < 4096 byte | No limit, but the total size of the message body < 4096 byte | It is prohibited to carry government, leader names, Taiwan independence and other related content, please refer to Honor message content specifications | 1 character for English and 3 characters for Chinese. |
| Meizu Channel | < 32 characters | < 100 characters | Special characters (such as #) are prohibited, please refer to Meizu push message content specifications | |
| Xiaomi Channel | < 50 characters | < 128 characters | Special characters (such as: #, >>) are prohibited, please refer to Xiaomi push message content specifications | |
| OPPO aisle | < 50 characters | < 50 characters | Specific reference OPPOContent specifications | |
| vivo aisle | < 40 characters | < 100 characters | ||
| APNS aisle | < 20 characters (40 English characters), ellipses will be displayed for the excess. | None yet | None yet | |
| Hongmeng Passage | No limit, but the total size of the message body < 4096 Bytes, recommended title < 40 characters | No limit, but the total size of the message body < 4096 Bytes, suggested content < 1024 characters | refer to Hongmeng Notification Content Management Rules | None yet |