Help Center> Message & SMS> API Reference> APIs> Application, Signature, and Template APIs> SMS Template APIs> Querying the Country or Region to Which SMSs Are Sent
Updated on 2023-07-06 GMT+08:00

Querying the Country or Region to Which SMSs Are Sent

Function

This API is used to query the country or region to which SMSs are sent.

URI

GET /v2/{project_id}/msgsms/country

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining Account, User, and Project Information.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

country_name_en

No

String

Country or region name (English).

country_name_zh

No

String

Country or region name (Chinese).

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Request body parameter type. This parameter must be set to application/json.

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token.

Response Parameters

Table 4 SmsCountryResp response parameters

Parameter

Description

country_id

Country or region ID.

country_name_en

Country or region name (English).

country_name_zh

Country or region name (Chinese).

Request Example

GET /v2/845ada5bc7444f1295cd517af0123da1/msgsms/country?country_name_en=Afghanistan 
Host: 100.85.***.***:30300
Content-Type: application/json
X-Auth-Token:******

Response Example

[
    {
        "country_name_en": "Afghanistan",
        
    }
]

Returned Values

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

System error