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 or the United States at a time. Each Alibaba Cloud account can run only one query per second (QPS).

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 Yes BatchSendMessageToGlobe

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

To String Yes [\"931520581****\",\"931530581****\",\"931540581****\",\"931550581****\"]

The mobile phone numbers that you want to 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.
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.

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

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 phone numbers. You can also send the same message to multiple mobile phone numbers. In this case, use the following format: [\"message\"].

Note The data format 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
TaskId String No 123789****

The ID of the task.

Response parameters

Parameter Type Example Description
ResponseCode String OK

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

RequestId String F655A8D5-B967-440B-8683-DAD6FF8D****

The ID of the request.

FailedList String ["931520581****","931530581****"]

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

ResponseDescription String The SMS Send Request was accepted

The description of the status code.

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 ["123****","124****"]

The ID of the sent text message.

SuccessCount String 2

The number of sent text messages.

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<BatchSendMessageToGlobeResponse>
<ResponseCode>OK</ResponseCode>
<RequestId>F655A8D5-B967-440B-8683-DAD6FF8D****</RequestId>
<FailedList>["931520581****","931530581****"]</FailedList>
<ResponseDescription>The SMS Send Request was accepted</ResponseDescription>
<From>Alicloud</From>
<MessageIdList>["123****","124****"]</MessageIdList>
<SuccessCount>2</SuccessCount>
</BatchSendMessageToGlobeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "ResponseCode" : "OK",
  "RequestId" : "F655A8D5-B967-440B-8683-DAD6FF8D****",
  "FailedList" : "[\"931520581****\",\"931530581****\"]",
  "ResponseDescription" : "The SMS Send Request was accepted",
  "From" : "Alicloud",
  "MessageIdList" : "[\"123****\",\"124****\"]",
  "SuccessCount" : "2"
}

Error codes

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