Skip to content

Get the country list

Dynamically get the country list, which can be used for front-end login page country selection and international SMS input box selection to reduce the size of front-end static resources.

Method name

AuthenticationClient.get_country_list

Request parameters

NameTypeRequiredDefault valueDescriptionSample value

Request response

Type: GetCountryListRespDto

NameTypeDescription
statusCodenumberBusiness status code, which can be used to determine whether the operation is successful, 200 means success.
messagestringDescription
apiCodenumberSegmented error code, which can be used to get the specific error type.
requestIdstringRequest ID. It will be returned when the request fails.
dataarrayresponse data

Sample result:

json
{
  "statusCode": 200,
  "message": "Operation successful",
  "requestId": "934108e5-9fbf-4d24-8da1-c330328abd6c",
  "data": {
    "alpha2": "CN",
    "alpha3": "CHN",
    "phoneCountryCode": "+86",
    "flag": "🇨🇳",
    "name": {
      "zh-CN": {
        "enabled": false,
        "value": "xxx"
      },
      "en-US": {
        "enabled": false,
        "value": "China"
      }
    }
  }
}

Data structure

CountryDetailInfo

NameTypeIs it required?DescriptionSample value
alpha2stringYesAlpha-2 abbreviation of the country in ISO 3166 international standardCN
alpha3stringYesAlpha-3 abbreviation of the country in ISO 3166 international standardCHN
phoneCountryCodestringYesCountry mobile phone area code+86
flagstringYesFlag icon🇨🇳
nameYesName, multi-language structure, currently only supports Chinese and English Nested type: <a LangObject。{"zh-CN":{"enabled":false,"value":"xxx"},"en-US":{"enabled":false,"value":"xxx"}}

LangObject

NameTypeIs it requiredDescriptionSample value
zh-CNYesMultilingual Chinese content Nested type: <a LangUnit。{"enabled":false,"value":"中文"}
en-USYesMultilingual English content Nested type: <a LangUnit。{"enabled":false,"value":"English"}
zh-TWYesMultilingual Traditional Chinese content Nested type: <a LangUnit.{"enabled":false,"value":"繁體中文"}
ja-JPYesMultilingual Japanese content Nested type: <a LangUnit.{"enabled":false,"value":"日本語"}

LangUnit

NameTypeIs it required?DescriptionSample value
enabledbooleanYesIs it enabled? If enabled, and the console selects this language, this content will be displayed. (Off by default)
valuestringyesMultilingual content

Agent infrastructure for identity, memory, and web action.