Message receipt configuration

更新时间:
复制 MD 格式

After you call a Short Message Service API operation, you can configure message receipts to receive delivery status updates, user replies, and the review status of your signatures and templates.

Message receipt overview

Short Message Service offers two modes for receiving message receipts: ApsaraMQ for MNS consumption mode and HTTP batch push mode.

ApsaraMQ for MNS consumption mode

In this mode, you use a queue to receive message receipts and MO messages for a specific region. ApsaraMQ for MNS supports outbound delivery for all business messages in Cloud Communications. When you subscribe to a message type (MessageType) in the Short Message Service console, the system automatically creates a dedicated message queue and a queue name (QueueName) for that type. You can then use the queue name (QueueName) and message type (MessageType) to retrieve SMS delivery reports from the queue using an SDK in your backend.

HTTP batch push mode

In this mode, the system sends messages to a web URL that you specify using HTTP POST requests. After you configure an HTTP callback URL (callback_url) in the Short Message Service console, the system automatically pushes business messages, such as MO messages or delivery reports, to that URL.

Message receipt types

After you choose a receipt mode, you must also select a message type (MessageType) to receive receipts for different scenarios. The available message types are listed below.

Messages sent to the Chinese mainland

Name

Description

ApsaraMQ for MNS

HTTP push

SmsUp (for MO messages)

An MO message is a message sent from an end user to a service provider, typically to subscribe to a service, make a query, or perform an action. By subscribing to SmsUp messages, you can receive the content of these user replies.

SmsUp

SmsUp

SmsReport (for delivery reports)

An MT message, the opposite of an MO message, is sent from a service provider to an end user, such as a notification or a business alert. Subscribe to SmsReport delivery reports to track the delivery status of each message that you send.

SmsReport

Note

If you send messages to international regions, you can use GlobeSmsReport to get delivery reports.

SmsReport

SignSmsReport (for signature review status)

After you apply for a signature by calling the AddSmsSign API operation, you can subscribe to SignSmsReport messages to receive updates on its review status.

-

SignSmsReport

TemplateSmsReport (for template review status)

After you apply for a message template by calling the AddSmsTemplate API operation, you can subscribe to TemplateSmsReport messages to receive updates on its review status.

-

TemplateSmsReport

Card messages

Name

Description

ApsaraMQ for MNS

HTTP push

MnsCardVender (for card message rendering)

When you create a card message template, you can subscribe to MnsCardVender messages to receive rendering messages.

MnsCardVender

MnsCardVender

MnsCardTemplate (for card message template review status)

After you apply for a card message template by calling the CreateCardSmsTemplate API operation, you can subscribe to MnsCardTemplate messages to receive updates on its review status.

MnsCardTemplate

MnsCardTemplate

Message receipt configuration

Note
  • Due to system cache, your configuration may take up to 15 minutes to take effect.

  • Network issues or response timeouts can cause duplicate receipts or failures to retrieve receipts. If a receipt does not arrive, call the QuerySendDetails API operation to query SMS sending details. You can query data from the last 24 hours and records from the last 30 days.

  • Message receipts do not guarantee idempotence. If your processing logic requires idempotence, you must implement it yourself.

Procedure

  1. Log on to the Short Message Service console.

  2. In the left-side navigation pane, choose General Settings > receipt configuration.

  3. On the Delivery Reports, MO Messages, or Review Statuses tab, enable your preferred mode.

    This section uses enabling delivery reports as an example. The process is similar for other types of receipts.

    ApsaraMQ for MNS

    Note

    To optimize performance and reduce load, message queues become dormant after three months of inactivity. They wake up automatically when a new message is sent.

    1. On the Messages Sent to Chinese Mainland page, click the Delivery Reports tab. Enable the ApsaraMQ for MNS consumption mode. The system automatically generates a queue name. Example: Alicom-Queue-i{InstanceID}-SmsReport.

    2. Set the Region.

      This region must match the region that you select for API calls.

    3. Click OK.

    HTTP push

    Note

    The response timeout for the HTTP batch push mode is 700 ms.

    1. Enable the HTTP batch push mode.

    2. Click Modify and enter the URL where you want to receive message receipts.

      Example: http://push.example.com/contextpath/receive.do.

    3. Click OK.

      After the configuration is saved, you can click Test to verify that your URL can receive a test receipt. If the test is successful, the Response Message field returns {"code": 0, "msg": "Success"}.

FAQ