Sends messages to the countries or regions outside the Chinese mainland. Each Alibaba Cloud account that uses the subscription billing method can run a maximum of 30 queries 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 SendMessageToGlobe

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

To String Yes 861245567****

The mobile phone numbers that you want to receive the message. You must add the country code to the beginning of each mobile phone number. Example: 861245567****.

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 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 task.

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 mobile phone number.

Carrier String CMI

The carrier that provides the mobile phone number.

Region String HongKong

The region to which the mobile phone number belongs.

Country String Hongkong, China

The country to which the mobile 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 that received the message.

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.