This API is used by the Push Kit server to send uplink messages to your server through HTTPS.
Protocol | HTTPS POST |
|---|---|
Direction | Push Kit server -> Your server |
URL | URL of your server for receiving uplink messages, which you defined and is the same as the receiving URL set in AppGallery Connect. |
Data Format | Request: Content-Type: application/json Response: Content-Type: application/json |
Request Header
Parameter | Description | Example |
|---|---|---|
X-HW-SIGNATURE | Message header signature, which is mandatory, indicating the signature information sent to your server that receives uplink messages. | timestamp=1563105451261; nonce=:; value=E4YeOsnMtHZ6592U8B9S37238E+Hwtjfrmpf8AQXF+c=
(timestamp + nonce + Uplink message content): obtained after the encryption using the set password in HMAC-SHA256 algorithm and encoding in Base64. |
X-HW-TIMESTAMP | Message header timestamp, which is mandatory, indicating the time when the Push Kit server receives uplink messages. | 1563105451261 |
Request Body
Parameter | Mandatory (M)/Optional (O) | Type | Description |
|---|---|---|---|
from | M | String | Token of the app that sends uplink messages. |
category | M | String | Package name of the app that sends uplink messages. |
message_id | M | String | Unique ID generated by the app for a message. |
data | O | String | Valid key-value pairs contained in the message. The parameter value needs to be encrypted using Base64. |