You need to enable the message receipt function in AppGallery Connect. For details about how to enable the function, please refer to Preparations.
Protocol | HTTPS POST |
|---|---|
Direction | Push Kit server -> Your server for receiving receipts |
URL | URL of your server for receiving receipts, which you defined and is the same as the callback address in AppGallery Connect. |
Data Format | Request: Content-Type: application/json Response: Content-Type: application/json |
Request Header
Parameter | Description | Example |
|---|---|---|
X-HUAWEI-CALLBACK-ID | Message header authentication parameter, which is optional. This parameter is mandatory when both the callback user name and key have been set in the receipt configuration. | timestamp=1563105451261; nonce=a07bfa17-6d82-4b53-a9a2-07cfef5ceef1; value=E4YeOsnMtHZ6592U8B9S37238E+Hwtjfrmpf8AQXF+c=
|
Request Body
Parameter | Mandatory (M)/Optional (O) | Type | Description |
|---|---|---|---|
statuses | M | array | Receipt content. A single receipt can contain 100 statuses structures. |
Parameter | Mandatory (M)/Optional (O) | Type | Description |
|---|---|---|---|
token | M | string | Token of the user to which a message is sent. The token is sent to your server. |
biTag | M | string | The value is the same as that of biTag contained in the message you send. If bi_tag is not set for sending a notification message, biTag is left empty. |
status | M | integer | Returned receipt status code. For details, please refer to receipt status codes. |
timestamp | M | Long | Standard Unix timestamp when a message arrives at the device. |
appid | M | string | App ID. |
requestId | M | string | Request ID, which is returned by the downlink message sending API. |
O | integer | Sub-status code that explains why the message sending is controlled. The options are as follows:
|
{
"statuses": [
{
"biTag": "131415",
"appid": "0000000013",
"token": "14889646529623230000000013000001",
"status": 0,
"timestamp": 1489993883189,
"requestId": "1234567890"
},
{
"biTag": "131415",
"appid": "0000000013",
"token": "14889646529623230000000113000001",
"status": 2,
"timestamp": 1489993888189,
"requestId": "1234567890"
}
]
}