- Development Integration
- /
- SDK
- /
- Python
- /
Authentication Module
- /
Others
- /
- Get Country List
¶ Get the country list
Update time: 2025-07-23 07:34:21
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
| Name | Type | Required | Default value | Description | Sample value |
|---|
¶ Request response
Type: GetCountryListRespDto
| Name | Type | Description |
|---|---|---|
| statusCode | number | Business status code, which can be used to determine whether the operation is successful, 200 means success. |
| message | string | Description |
| apiCode | number | Segmented error code, which can be used to get the specific error type. |
| requestId | string | Request ID. It will be returned when the request fails. |
| data | array | response data |
Sample result:
{
"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
| Name | Type | Is it required? | Description | Sample value |
|---|---|---|---|---|
| alpha2 | string | Yes | Alpha-2 abbreviation of the country in ISO 3166 international standard (opens new window) | CN |
| alpha3 | string | Yes | Alpha-3 abbreviation of the country in ISO 3166 international standard (opens new window) | CHN |
| phoneCountryCode | string | Yes | Country mobile phone area code | +86 |
| flag | string | Yes | Flag icon | 🇨🇳 |
| name | Yes | Name, multi-language structure, currently only supports Chinese and English Nested type: LangObject。 | {"zh-CN":{"enabled":false,"value":"xxx"},"en-US":{"enabled":false,"value":"xxx"}} |
¶ LangObject
| Name | Type | Is it required | Description | Sample value |
|---|---|---|---|---|
| zh-CN | Yes | Multilingual Chinese content Nested type: LangUnit。 | {"enabled":false,"value":"中文"} | |
| en-US | Yes | Multilingual English content Nested type: LangUnit。 | {"enabled":false,"value":"English"} | |
| zh-TW | Yes | Multilingual Traditional Chinese content Nested type: LangUnit. | {"enabled":false,"value":"繁體中文"} | |
| ja-JP | Yes | Multilingual Japanese content Nested type: LangUnit. | {"enabled":false,"value":"日本語"} |
¶ LangUnit
| Name | Type | Is it required? | Description | Sample value |
|---|---|---|---|---|
| enabled | boolean | Yes | Is it enabled? If enabled, and the console selects this language, this content will be displayed. (Off by default) | |
| value | string | yes | Multilingual content |
