| Protocol | HTTPS POST |
|---|---|
| Direction | Your server -> Push Kit server |
| URL | https://push-api.cloud.huawei.com/v3/[projectId]/messages:send NOTE: In the URL, [projectId] indicates the project ID. To obtain the project ID, sign in to AppGallery Connect, click My projects, click the desired project, and go to the Project settings page. |
| Data Format | Content-Type: application/json |
| Parameter | Description | Example |
|---|---|---|
| Authorization | Authentication mode: JWT For details, please refer to Generating a JWT Based on a Service Account. NOTE: You are advised to set the JWT validity period to 3600 seconds, within which a JWT can be reused. The value of this parameter is Bearer followed by a space character and then the obtained authentication information. | Bearer eyJr*****OiIx---****.eyJh*****iJodHR--***.QRod*****4Gp---**** |
| push-type | Message type. The options are as follows: 0: alert message (notification message and authorized subscription message) 1: widget update message 2: extended notification message 6: background message 7: live view message 10: in-app call message | 0 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| payload | Yes | Object | Message structure. The payload definition varies depending on the push-type value:
|
| pushOptions | No | Object | Sending control parameter. For details, please refer to pushOptions. |
| target | Yes | Object | Sending target. For details, please refer to target. |