This topic provides a demo to describe how to use the Alibaba Cloud SDK for Python to call the SendMessageToGlobe operation. This API operation allows you to send text messages to the regions outside Mainland China.


  • When you construct the AcsClient object, you must use the default value of the regionId parameter. The default value is ap-southeast-1. Note that regionId is the third parameter when you construct the AcsClient object.
  • You must use the default domain name:
  • You must use the default API version number: 2018-05-01.

Sample code

#! /usr/bin/env python
import os
from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.request import CommonRequest
client = AcsClient('<accessKeyId>', '<accessSecret>', 'ap-southeast-1')
request = CommonRequest()
request.add_query_param('To', '62813****7451')
request.add_query_param('From', '1234')
request.add_query_param('Message', 'Have a test.')
response = client.do_action(request)
# python2: print(response) 
print(str(response, encoding = 'utf-8'))