Sends a text message to a region outside Mainland China. You cannot send text messages to China (mainland) and the United States. Access interface is limited to 30QPS for online subscription customers.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample code.

Request parameters

Parameter Type Required Example Description
Action String No SendMessageToGlobe

The operation that you want to perform. Valid values: SendMessageToGlobe .

Message String Yes Hello

The content of the text message.

To String Yes 861245567****

The mobile phone numbers to receive the text messages. You must add the country code to the beginning of each mobile phone number. Example: 861245567 ****.

From String No Alicloud

The ID 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 123xxx789

The ID of the export task that you want to delete.

Response parameters

Parameter Type Example Description
From String Alicloud

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

MessageId String 1008030300****

The ID of the text message.

NumberDetail Struct

The details of the mobile phone number.

Carrier String CMI

The carrier that provides the mobile phone number.

Country String Hongkong, China

The country to which the mobile phone number belongs.

Region String HongKong

The region to which the mobile phone number belongs.

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

The ID of the request.

ResponseCode String OK

The status code that indicates whether the request of sending the text message was submitted.

ResponseDescription String The SMS Send Request was accepted

The detailed description of the status code that indicates whether the request of sending the text message was submitted.

Segments String 1

The number of the text messages that incurred fees.

To String "123"

The mobile phone number that received the text message.

Examples

Sample requests


     http(s)://dysmsapi.ap-southeast-1.aliyuncs.com/? Action=SendMessageToGlobe &Message=Hello &To=861245567 **** &<common request parameters> 
   

Sample success responses

XML format


     <SendMessageToGlobeResponse> <From>Alicloud</From> <MessageId>1008030300****</MessageId> <NumberDetail> <Carrier>CMI</Carrier> <Country>Hongkong,China</Country> <Region>HongKong</Region> </NumberDetail> <ResponseCode>OK</ResponseCode> <ResponseDescription>The SMS Send Request was accepted</ResponseDescription> <RequestId>F655A8D5-B967-440B-8683-DAD6FF8DE990</RequestId> <Segments>1</Segments> <To>123</To> </SendMessageToGlobeResponse> 
   

JSON Format


     { "From": "Alicloud", "MessageId": "1008030300****", "NumberDetail": { "Carrier": "CMI", "Country": "Hongkong,China", "Region": "HongKong" }, "ResponseCode": "OK", "ResponseDescription": "The SMS Send Request was accepted", "RequestId": "F655A8D5-B967-440B-8683-DAD6FF8DE990", "Segments": "1", "To": ["123"] } 
   

Error codes

Go to the Error CenterFor more information, see error codes.