This topic describes the modes in which the delivery reports of text messages are consumed.

Push SMS delivery reports to MNS queues

Short Message Service (SMS) can push SMS delivery reports to MNS queues. You can enable this feature in the SMS console. Log on to the SMS console. In the left-side navigation pane, choose System Setting > General Setting. On the General Setting page, click the API Setup tab. In the SMS Delivery Report Setting section, turn on the "Message Queue to receive SMS Delivery Report" switch. The system creates a queue, and displays the name of the queue. You can call the SDK to pull the reports based on the message type and queue name.

Request parameters

Parameter Type Required Example Description
MessageType String Yes SmsReport The type of the message.
QueueName String Yes Alicom-Queue-xxxxxx-SmsReport The name of the queue. You can view the name of the queue on the General Setting page of the SMS console.

Push SMS delivery reports in batches to an HTTP URL

SMS can send HTTP POST requests to push SMS delivery reports in batches to an HTTP callback URL. You can enable this feature in the SMS Delivery Report Setting section of the API Setup tab on the General Setting page. You can set the URL that receives the reports and then pull reports from the URL.

The following table describes the parameters of an SMS delivery report.

Parameter Description
Protocol HTTP + JSON
Encoding UTF-8
Sample response

{
  "code" : 0,
  "msg" : "The message is received."
}

Response parameters

Parameter Type Description Example Required
code Number The code of the response. 0 Yes
msg String The description of the response. Received No
Note The httpStatus parameter must be set to 200.

Report-related parameters

For information about the parameters related to SMS delivery reports, see SmsReport.