Use the SMS supplement service

更新时间:
复制 MD 格式

The Message Push service offers an SMS supplement service to expand user reach and improve message delivery rates. If a user cannot receive an app push notification because of network issues, background app restrictions, or message delays, this service sends the message through the SMS channel instead. You can use the SMS supplement service in the console or by calling API operations.

Important

  • Currently, the SMS supplement service is available only in the Hangzhou non-finance region.

  • Using the SMS service incurs additional carrier fees. For more information about the billing methods and pricing of Short Message Service, see Short Message Service billing methods.

The procedure for using the SMS supplement service is as follows:

1

Activate Alibaba Cloud Short Message Service

Use your current Alibaba Cloud account to activate Alibaba Cloud Short Message Service. You only need to activate the service once.

Alternatively, you can activate Short Message Service from the Message Push console. In the mPaaS console, choose Message Push > SMS Supplement Service from the navigation pane on the left. Click the link to the Short Message Service console to open the activation page and complete the process.

Set SMS templates and signatures

After activating Short Message Service, set the SMS templates and signatures in the Short Message Service console as needed. For more information, see Create an SMS template and Create an SMS signature. After the templates and signatures are approved, you can send text messages from the console or by calling API operations.

Note

Carriers require that SMS signatures and templates are approved before use. Because a manual review is required, create them in advance to avoid any disruption to your SMS service.

Authorize the Short Message Service console

Grant authorization to the Message Push service-linked role. The procedure is as follows:

  1. In the mPaaS console, choose Message Push > SMS Supplement Service from the navigation pane on the left.

  2. Under Short Message Service Console Authorization, turn on the Enable SMS Integration switch. In the mPaaS Message Push Service-Linked Role authorization window that appears, click Confirm.

    This action automatically creates the mPaaS Message Push service-linked role. It also grants the role the permission to use Short Message Service for supplemental pushes.

    To disable SMS integration, turn off the Enable SMS Integration switch.

For more information about service-linked roles, see mPaaS service-linked roles.

Associate device mobile phone numbers

To receive text messages, associate a mobile phone number with each device using the client SDK. The binding interface associates the device ID (token) with the user's mobile phone number. After the number is associated, the user can receive supplemental push notifications as text messages on that phone.

  • Android client

    String userId = "custom_userId";
    String phoneNumber = "138xxxxxxxx"
    ResultPbPB bindResult = MPPush.bind(context, userId, token,phoneNumber);
    Log.d("Bind userId " + (bindResult.success ? "succeeded" : ("failed: " + bindResult.code)));

    For more information, see Integrate with Android.

  • iOS client

      // To use the SMS supplement service, upload a mobile phone number in the binding interface.
      - (void)pushBindWithUserId:(NSString *)userId phoneNumber:(NSString *)phoneNumber completion:(void (^)(NSException *error))completion;

    For more information, see Integrate with iOS.

Set an SMS supplement policy

After you complete the steps above, create a message push task on the Message Management page in the Message Push console. Enable the SMS supplement service, select an SMS signature and template, and set an SMS supplement policy. You can also send supplemental pushes by calling the push API. For more information, see Server-side API reference.

  • Concurrent: Sends messages through both app push and SMS channels at the same time. This method enables parallel delivery of specific messages across multiple channels and is ideal for broadcasting important messages to a large audience. For example, a bank might use both app push and SMS channels to send promotional notifications for an operational activity.

  • Supplement: Sends a text message to users who did not receive the initial app push notification. This method improves the message delivery rate. For example, many banks use app pushes as the primary channel for account activity notifications. If an app push fails to arrive, a text message is sent to the customer instead.

Send multi-channel integrated pushes

You can send multi-channel integrated message pushes from the console or by calling an API operation.

FAQ

If you encounter issues when sending text messages, such as problems with template or signature reviews, see SMS sending issues.