Sends one or more text messages to multiple mobile phone numbers outside mainland China at a time. You cannot send one or more text messages to multiple mobile phone numbers in mainland China and the United States at a time. Each Alibaba Cloud account can run only one query per second (QPS). You can specify a maximum of 250 mobile phone numbers. If you have higher requirements, you can contact customer service to increase the quota to 1,000 mobile phone numbers.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No BatchSendMessageToGlobe

The operation that you want to perform. Set the value to BatchSendMessageToGlobe.

Message String Yes [\"message to 931520581****\",\"message to 931530581****\",\"message to 931540581****\"]

The content of the text message. You must specify one or more messages. If you want to send different messages to different mobile phone numbers, the number of messages must be the same as the number of mobile numbers. You can also send the same message to multiple mobile numbers. In this case, use the following format: [\"message\"].

Note The data format of this parameter must be JSON array string.
To String Yes [\"931520581****\",\"931530581****\",\"931540581****\"]

The mobile phone numbers that receive the text messages. You must add the country code to the beginning of each mobile phone number. The mobile phone numbers must be an array.

Note The data type of this parameter must be JSON array string.
Type String Yes OTP

The type of the text message. Valid values:

OTP: verification code

NOTIFY: notification

MKT: promotional message

GENERAL: general-purpose message

From String No Alicloud

The identifier 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 only letters, the sender ID can be a maximum of 11 characters in length. If the sender ID contains only digits, the sender ID can be a maximum of 15 characters in length.

TaskId String No 123789****

The ID of the task.

Response parameters

Parameter Type Example Description
FailedList String ["931520581****","931540581****"]

The list of the mobile numbers that failed to receive the text messages.

From String Alicloud

The sender ID that was returned. The API operation returns the sender ID that you have specified in the request parameters.

MessageIdList String ["931530581****","931530581****"]

The ID list of the text messages. If you send multiple text messages, each message ID corresponds to a mobile phone number that received the message.

RequestId String F655A8D5-B967-440B-8683-DAD6FF8DE990

The ID of the request.

ResponseCode String OK

The status code. If OK is returned, the request is successful. For more information, see Error codes.

ResponseDescription String The SMS Send Request was accepted

The description of the status code.

SuccessCount String 1

The number of sent text messages.

Examples

Sample requests

http(s)://dysmsapi.ap-southeast-1.aliyuncs.com/? Action=BatchSendMessageToGlobe
&Message=[\"message to 931520581****\",\"message to 931530581****\",\"message to 931540581****\"] 
&To=[\"931520581****\",\"931530581****\",\"931540581****\"]
&Type=OTP
&<Common request parameters>

Sample success responses

XML format

<BatchSendMessageToGlobeResponse>
  <ResponseCode>OK</ResponseCode>
  <RequestId>F655A8D5-B967-440B-8683-DAD6FF8DE990</RequestId>
  <FailedList>["931520581****","931540581****"]</FailedList>
  <ResponseDescription>The SMS Send Request was accepted</ResponseDescription>
  <From>Alicloud</From>
  <MessageIdList>["1008030300****","1008030300****"]</MessageIdList>
  <SuccessCount>1</SuccessCount>
</BatchSendMessageToGlobeResponse>

JSON format

{
    "ResponseCode": "OK",
    "RequestId": "F655A8D5-B967-440B-8683-DAD6FF8DE990",
    "FailedList": "[\"931520581****\",\"931540581****\"]",
    "ResponseDescription": "The SMS Send Request was accepted",
    "From": "Alicloud",
    "MessageIdList": "[\"1008030300****\",\"1008030300****\"]",
    "SuccessCount": 1
}

Error codes

For a list of error codes, visit the API Error Center.