Sending Text Messages with Alibaba Cloud SMS

By Kenny Lai, Solutions Architect

Alibaba Cloud Short Message Service (SMS) is a messaging service that covers the globe, providing convenient, efficient, and intelligent communication capabilities that help businesses quickly contact their customers. You can call API operations to send verification codes, notifications, and marketing messages. SMS delivered 600 million messages to 200 million users during the Alibaba 11/11 Global Shopping Festival.


  1. An enterprise Alibaba Cloud account
  2. A RAM account with AliyunDysmFullAccess policy attached
  3. A mobile phone number which can receive SMS
  4. Some programming skill (java in this example)


Check if your Alibaba Cloud account is an enterprise account. If you have previously registered for an individual account, you can file a work order to request for an upgrade.

Locate SMS console on the Alibaba Cloud console.

From the SMS console overview page, navigate to Go Globe.

Click New Content

Content Type : OTP

Subject : SMS OTP

SMS Content: Your Verification Code: ${code}, will expire 5 minutes later.

Click Submit and a new entry will appear.

Record the Content Code as it will be reference in the program later.

Use the sample code below

Remember to update the variables as follows:

  • accessKeyId: RAM account's access key
  • accessKeySecret: RAM account's Secret
  • tel: Telephone number you would send the SMS to

Sample Code

Corresponding maven pom file

And the dysms jar package can be downloaded from link

You should receive an SMS as shown in the image below.

From the console, you can check the SMS delivery info.

The SMS console also supports checking the delivery status (you can also get the info using API).

That’s it. Enjoy using Alibaba Cloud Short Message Service (SMS) to global.


Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store