After you send messages, you can configure a Message Service (MNS) queue or an HTTP URL to receive receipt messages or mobile originated (MO) messages. This way, you can deploy your services based on the delivery status of messages.
Destinations of delivery receipts
You can configure an MNS queue or HTTP URL to receive receipt messages or MO messages based on your needs.
- MNS queues
You can configure a Message Service (MNS) queue to receive delivery receipts and mobile originated (MO) messages from a specified region. MNS queues support all types of SMS messages. After you enable MNS to subscribe to a specified message type in the SMS console, MNS automatically generates a message queue. You can call the SMS SDK to pull delivery reports based on the message type and queue name.
- HTTP URLs
You can configure an HTTP URL to receive delivery receipts and MO messages. SMS pushes delivery receipts and MO messages to the HTTP URL by using the HTTP POST method. After you configure an HTTP callback URL in the SMS console, SMS uses HTTP POST requests to send delivery reports to the callback URL. You can retrieve the delivery reports from the URL.
Types of delivery receipts
You need to select the types of receipt messages or MO messages that you want to receive. Different types of receipt messages and MO messages are used in different scenarios. The following table lists the types of receipt messages and MO messages.
|Type||Description||MNS queues||HTTP URLs|
|MT delivery report||A mobile terminated (MT) message, such as a notification or business message is sent from SMS carriers to customers. Delivery reports allow you to know the delivery status and details of each message.||SmsReport||SmsReport|
Configure delivery receipts
You need to configure delivery receipts in the SMS console. In this example, delivery reports are configured.
- Log on to the SMS console.
- In the left-side navigation, choose .
- In the General Settings pane, click API.
- In the SMS Delivery Report Setting section, configure the method to receive delivery reports based on your needs.
- MNS queuesTurn on Message queues.
- HTTP URLs
- Turn on HTTP URLs.
- Enter an HTTP URL. Example: http://push.example.com/contextpath/receive.do.
- Click Save.
- MNS queues
|MessageType||String||Yes||SmsReport||The type of the message. Set the value to SmsReport.|
|QueueName||String||Yes||Alicom-Queue-*****-SmsReport||The name of the queue. To query the name of the queue, log on to the SMS console, and then choose in the left-side navigation pane.|