5GSmsReport
After you send a 5G message by calling the SendRCS or SendRCSReply operation, the platform pushes a delivery status report to the HTTP callback URL you configured. Your endpoint must receive the report and return a response in the format specified by the platform.
Usage instructions
To receive 5G message delivery status reports over HTTP, log on to the SMS Service console, enable 5GSmsReport (Downlink Message Status Report Reception), and configure the Receiving Address.
By subscribing to 5GSmsReport delivery status reports, you can track whether each 5G message has reached the end user.
Request parameters
The platform pushes parameters in JSON Array format. Status reports do not differentiate between batch and individual sending — a single request may contain multiple status report entries.
Protocol
| Parameter | Description |
| Request protocol | HTTP, POST method |
| Request format | application/json |
| Encoding | UTF-8 |
Request example
The following example shows a delivery status report payload:
[
{
"phone_number" : "1350001234",
"send_time" : "2017-01-01 00:00:00",
"report_time" : "2017-01-01 00:00:00",
"send_status" : "SEND_SUCCESS",
"err_code" : "DELIVERED",
"err_message" : "User received successfully",
"rcs_template_code" : "RCS_SMS_10001052",
"rcs_template_type" : "0",
"rcs_template_format" : "PLAIN_TEXT",
"rcs_size" : 2,
"rcs_id" : "100000096034031_1552101_03304904325170151776946304855",
"in_reply_to_rcs_id" : "100000096034031_1552101_03304904325170151776946304856",
"biz_id" : "217124476946304664",
"out_id" : "12391244932857"
}
]Field descriptions
| Name | Type | Description |
phone_number | String | The recipient mobile phone number. |
send_time | String | The time the message was sent. |
report_time | String | The time the status report was generated. |
send_status | String | The overall delivery status. Valid values: SEND_SUCCESS (delivery succeeded), SEND_FAILED (delivery failed). |
err_code | String | The detailed status code. For example, DELIVERED (delivery succeeded), MOBILE_NOT_SUPPORT_RCS (device does not support 5G messaging), etc. |
err_message | String | The status report description. |
rcs_template_code | String | The template code. |
rcs_template_type | String | The template type. Valid values: 0 (verification code), 1 (notification), 2 (promotional message). |
rcs_template_format | String | The template format. Valid values: PLAIN_TEXT (plain text template), RCS (rich media template). |
rcs_size | Integer | The number of message segments. Calculation rules are based on the byte length of text messages using UTF-8 encoding: one English character or digit equals one byte, one Chinese character (including traditional Chinese) equals three bytes, Chinese punctuation marks occupy three bytes, and English punctuation marks occupy one byte. For example, a text message with 70 Chinese characters has a byte length of 210. |
rcs_id | String | The unique 5G message ID. |
in_reply_to_rcs_id | String | The ID of the message that this is a reply to. |
biz_id | String | The send receipt ID (send sequence number). This is the BizId field value returned when you call the SendRCS or SendRCSReply operation. |
out_id | String | The custom sequence number provided during sending (the OutId parameter of the sending operation). |
Response format
After your HTTP endpoint receives the request, respond in the following format.
Response example
The following example shows the expected response:
{
"code" : 0,
"msg" : "Received successfully"
}Response fields
| Name | Type | Required | Example | Description |
code | Number | Yes | 0 | The response code. The system validates that the value is a number but does not validate the content. |
msg | String | No | Received successfully | The description. |
If the HTTP status code is 200, the request is considered successful. If the HTTP status code is non-200 or the response times out, the system retries the push.
If a system exception or consumption failure occurs, return HTTP status code 5xx.
Retry mechanism
After the first push fails, the system retries at intervals of 1 minute, 5 minutes, and 10 minutes. If the push still fails after three retries, no further retries are made.
Callback messages do not guarantee idempotence. In the event of network exceptions or response timeouts, callback messages may be pushed repeatedly. If your processing logic requires idempotence, implement appropriate deduplication based on rcs_id or biz_id according to your business scenario.
Code example
The following Java snippet shows how to receive delivery status reports using a Spring Boot controller:
@PostMapping("/resMsg")
public JSONObject resMsg(@RequestBody JSONArray array) {
// TODO: You need to handle the callback messages yourself. This example only prints the callback information.
System.out.println(array.toJSONString());
JSONObject json = new JSONObject();
json.put("code", 0);
json.put("msg", "Received successfully");
return json;
}