Sends text messages to Hong Kong (China), Macao (China), Taiwan (China), and other countries and regions outside the Chinese mainland.
Operation description
-
You can call this API to send text messages to Hong Kong (China), Macao (China), Taiwan (China), and other countries and regions outside the Chinese mainland. You can also manually send text messages on the Send Tasks page.
-
This API does not support sending text messages to the Chinese mainland.
-
You cannot use resource packages if your account has an overdue payment. Before you call the API, check your account balance and the remaining quota of your resource packages.
-
On the Alibaba Cloud International site (www.alibabacloud.com), Short Message Service (SMS) is billed based on the submission status of messages. You are charged even if a carrier receipt indicates that the message failed to be delivered. For more information about resource packages and the pay-as-you-go billing method, see Billing.
QPS limits
The queries per second (QPS) limit for this API is 2,000 calls per second for each Alibaba Cloud account. API calls that exceed this limit are throttled, which can affect your business. Ensure that your calls do not exceed this limit.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dysms:SendMessageToGlobe |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| To |
string |
Yes |
The destination phone number. The format is For more information, see Dialing codes. Note
The SendMessageToGlobe API does not support sending text messages to the Chinese mainland. |
8521245567**** |
| From |
string |
No |
The sender's phone number or a sender ID. A sender ID can contain only letters and digits. An alphanumeric sender ID can be up to 11 characters long. A numeric-only sender ID can be up to 15 digits long. |
Alicloud321 |
| Message |
string |
Yes |
The content of the text message. |
Hello |
| Type |
string |
No |
The type of the text message. Valid values:
|
NOTIFY |
| TaskId |
string |
No |
The task ID. The ID can be up to 255 characters long. This ID is available in the TaskId field of the message receipt. |
123****789 |
| ValidityPeriod |
integer |
No |
The validity period of the text message, in seconds. |
600 |
| ChannelId |
string |
No |
The channel ID. |
3790 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| ResponseCode |
string |
The status code of the message submission. |
OK |
| NumberDetail |
object |
The details of the phone number. |
|
| Carrier |
string |
The carrier network to which the phone number belongs. |
CMI |
| Region |
string |
The region to which the phone number belongs. |
HongKong |
| Country |
string |
The country to which the phone number belongs. |
China |
| RequestId |
string |
The request ID. |
F655A8D5-B967-440B-8683-DAD6FF8DE990 |
| Segments |
string |
The number of text messages that are billed. |
1 |
| ResponseDescription |
string |
The description of the message submission status code. |
The SMS Send Request was accepted |
| From |
string |
The sender number. This is the sender ID specified in the request. |
Alicloud321 |
| To |
string |
The destination phone number. |
1380000**** |
| MessageId |
string |
The message ID. |
1008030300**** |
Examples
Success response
JSON format
{
"ResponseCode": "OK",
"NumberDetail": {
"Carrier": "CMI",
"Region": "HongKong",
"Country": "China"
},
"RequestId": "F655A8D5-B967-440B-8683-DAD6FF8DE990",
"Segments": "1",
"ResponseDescription": "The SMS Send Request was accepted",
"From": "Alicloud321",
"To": "1380000****",
"MessageId": "1008030300****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.