Sends messages to countries or regions outside the Chinese mainland.
Usage notes
You cannot call the SendMessageToGlobe operation to send messages to the Chinese mainland.
QPS limit
You can call this operation up to 30 times per second. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | SendMessageToGlobe |
The operation that you want to perform. Set the value to SendMessageToGlobe. |
To | String | Yes | 8521245567**** |
The mobile phone number of the recipient. You must add the dialing code to the beginning of each mobile phone number. Example: 8521245567****. |
From | String | No | Alicloud |
The mobile phone number of the sender. You can specify the sender ID when you call the API operation. The sender ID can contain digits and letters. If the sender ID contains letters and digits, it can be a maximum of 11 characters in length. If the sender ID contains only digits, it can be a maximum of 15 characters in length. |
Message | String | Yes | Hello |
The content of the message. |
TaskId | String | No | 123****789 |
The ID of the messaging campaign. It must be 1 to 255 characters in length. The ID is the value of the TaskId field in the delivery receipt of the message. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ResponseCode | String | OK |
The status code that indicates whether the message was sent. |
NumberDetail | Object |
The details about the recipient phone number. |
|
Carrier | String | CMI |
The carrier that provides the recipient phone number. |
Region | String | HongKong |
The region to which the recipient phone number belongs. |
Country | String | Hongkong, China |
The country to which the recipient phone number belongs. |
RequestId | String | F655A8D5-B967-440B-8683-DAD6FF8DE990 |
The ID of the request. |
Segments | String | 1 |
The number of the messages that incurred fees. |
ResponseDescription | String | The SMS Send Request was accepted |
The description of the status code that indicates whether the message was sent. |
From | String | Alicloud |
The sender ID that was returned. The API operation returns the sender ID that you have specified in the request parameters. |
To | String | "123" |
The mobile phone number of the recipient. |
MessageId | String | 1008030300**** |
The ID of the message. |
Examples
Sample requests
http(s)://dysmsapi.ap-southeast-1.aliyuncs.com/?Action=SendMessageToGlobe
&To=861245567****
&From=Alicloud
&Message=Hello
&TaskId=123****789
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<SendMessageToGlobeResponse>
<ResponseCode>OK</ResponseCode>
<NumberDetail>
<Carrier>CMI</Carrier>
<Region>HongKong</Region>
<Country>Hongkong, China</Country>
</NumberDetail>
<RequestId>F655A8D5-B967-440B-8683-DAD6FF8DE990</RequestId>
<Segments>1</Segments>
<ResponseDescription>The SMS Send Request was accepted</ResponseDescription>
<From>Alicloud</From>
<To>"123"</To>
<MessageId>1008030300****</MessageId>
</SendMessageToGlobeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"ResponseCode" : "OK",
"NumberDetail" : {
"Carrier" : "CMI",
"Region" : "HongKong",
"Country" : "Hongkong, China"
},
"RequestId" : "F655A8D5-B967-440B-8683-DAD6FF8DE990",
"Segments" : "1",
"ResponseDescription" : "The SMS Send Request was accepted",
"From" : "Alicloud",
"To" : "123",
"MessageId" : "1008030300****"
}
Error codes
For a list of error codes, visit the API Error Center.