Uplink Message Push
Push uplink messages to the customer’s specified address through HTTP batch push.
Protocol Description
| Category | Description |
|---|---|
| URL | User-configured HTTP callback address (currently needs to be actively provided by the user) |
| Method | POST |
| Protocol | HTTP + JSON |
| Encoding | UTF-8 |
Request Description
The request is in JSON Array format, and a single request may contain multiple uplink message contents.
Request Example
{
MsgType: 0,
Data: [
{
ExtendCode: "12345",
UserId: "you man c define the content by yrself",
Phone: "185****9057",
ReplyContent: "OK, it can be done",
ReplyTime: 1573552778
},
{
ExtendCode: "12346",
UserId: "you man c define the content by yrself",
Phone: "185****9057",
ReplyContent: "Received, thank you",
ReplyTime: 1573552778
}
]
}Parameter Description
| Parameter name | Type | Description | Example | Required |
|---|---|---|---|---|
| MsgType | int | Push message type, 0 represents uplink messages | 0 | Yes |
| Data | Array | Batch list | Yes |
- Data
| Parameter name | Type | Description | Example | Required |
|---|---|---|---|---|
| ExtendCode | string | Extension code, not included by default | 12345 | No |
| UserId | string | Custom business identification ID, string (length cannot exceed 32 characters) | xxx-uhost-001 | No |
| Phone | string | Phone number | 18512345678 | Yes |
| ReplyContent | string | Uplink (reply) message | OK, got it | Yes |
| ReplyTime | int | Reply time | 1563867000 | Yes |
Response Description
Response Example
{
code: 0,
message: "ok"
}Parameter Description
| code | message | Description |
|---|---|---|
| 0 | ok | Successful reception |
| Non-0 | Error description | Unsuccessful reception |
Retry Description
If the initial push fails (non-success response), a retry will be attempted every 1 second. If after 3 accumulated retries it is still unsuccessful, the pushing will stop.