- Development Integration
- /
- SDK
- /
- Java
- /
User 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.getCountryList
¶ Request Parameters
| Name | Type | Is it required | Default Value | Description | Example 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 |
Example Results:
{
"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": "中国"
},
"en-US": {
"enabled": false,
"value": "China"
}
}
}
}
¶ Data Structure
¶ CountryDetailInfo
| Name | Type | Is it required | Description | Example Value |
|---|---|---|---|---|
| alpha2 | string | Yes | Alpha-2 abbreviation of the country in the ISO 3166 international standard (opens new window) | CN |
| alpha3 | string | Yes | Alpha-3 abbreviation of the country in the 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":"中国"},"en-US":{"enabled":false,"value":"中国"}} |
¶ LangObject
| Name | Type | Is it required | Description | Example Value |
|---|---|---|---|---|
| zh-CN | Yes | Multi-language 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 | Example Value |
|---|---|---|---|---|
| enabled | boolean | yes | Whether it is enabled. If enabled, and the console selects this language, the content will be displayed. (Default is off) | |
| value | string | yes | Multilingual content |
