Sends a text message to Hong Kong (China), Macao (China), Taiwan (China), and regions outside the Chinese mainland.
Operation description
-
You can invoke this operation to send text messages to Hong Kong (China), Macao (China), Taiwan (China), and regions outside the Chinese mainland, or manually send text messages on the Send node interface.
-
This operation does not support sending text messages to the Chinese mainland.
-
Resource plans cannot be used when your account has an overdue payment. Check your account balance and resource plan balance before you invoke this operation.
-
Short Message Service (SMS) on the international site is billed based on the commit status of text messages. You are still charged even if the carrier receipt indicates "failed". For details about resource plans and the pay-as-you-go billing method, see Billing.
QPS limit
The queries per second (QPS) limit for a single user (the same Alibaba Cloud account) on this operation is 2,000 calls per second. If the limit is exceeded, API calls are throttled, which may affect your business. Call this operation at a reasonable frequency.
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 recipient phone number. Format: For more information about country codes, see Dialing codes. Note
The SendMessageToGlobe operation does not support sending text messages to the Chinese mainland. |
8521245567**** |
| From |
string |
No |
The sender ID. Sender IDs are supported and can contain only digits and letters. A sender ID that contains letters can be up to 11 characters in length, and a sender ID that contains only digits can be up to 15 characters in length. |
Alicloud321 |
| Message |
string |
Yes |
The content of the text message. |
Hello |
| Type |
string |
No |
The message type. Valid values:
|
NOTIFY |
| TaskId |
string |
No |
The task ID. The ID can be up to 255 characters in length. You can obtain the task ID from the TaskId field in the text message receipt. |
123****789 |
| ValidityPeriod |
integer |
No |
The validity period of the text message. Unit: seconds. |
600 |
| ChannelId |
string |
No |
The channel ID. |
3790 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| ResponseCode |
string |
The submit status code of the text message. |
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 billed message segments. |
1 |
| ResponseDescription |
string |
The description of the submit status code. |
The SMS Send Request was accepted |
| From |
string |
The sender ID. The value is the sender ID that you specified in the request. |
Alicloud321 |
| To |
string |
The recipient 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.