调用该接口获取用户账号对应的 Region 信息。支持手机、邮箱、国家、OAuthCode(此接口云端与客户端通用)。
| 路径 | /living/account/region/get | 
| 版本号 | 1.0.2 | 
| 协议 | HTTPS | 
| 请求方法 | POST | 
| 是否需要用户身份鉴权 | 否 | 
| 超时时间 | 10000 | 
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 | 
|---|---|---|---|---|
| type | String | 是 | PHONE | 查询模式,可取值为 COUNTRY_CODE(国家code查询模式), PHONE(手机号码模式), EMAIL(邮箱模式), GOOGLE_AUTHCODE(google授权code模式), THIRD_AUTHCODE(三方账号授权code模式)。 | 
| countryCode | String | 否 | CN | 国家标识码,例如 CN,type 为 COUNTRY_CODE 时有效,具体清单详见【国家码列表】里的“domainAbbreviation”参数。 | 
| phone | String | 否 | 111222**** | 手机号码,type为PHONE时有效。 | 
| String | 否 | xxx@xxx.com | 邮箱,type为EMAIL时有效。 | |
| authCode | String | 否 | AuthCode,type 为 GOOGLE_AUTHCODE和THIRD_AUTHCODE 时有效。 | |
| phoneLocationCode | String | 否 | 86 | 电话号码的区号,例如中国的区号是86,type为PHONE时有效。 | 
返回数据
| 名称 | 类型 | 示例值 | 描述 | 
|---|---|---|---|
| code | Int | 
                               响应码,200:成功。  | 
                           
                        |
| message | String | 
                               错误消息。  | 
                           
                        |
| localizedMsg | String | 
                               本地语言错误消息。  | 
                           
                        |
| data | JSON | 
                               此账号对应的 Region 信息。  | 
                           
                        |
| regionId | String | 
                               Region id,例如 cn-shanghai。  | 
                           
                        |
| mqttEndpoint | String | 
                               当前 regionId 所对应的 mqtt 接入点,例如 ssl://1.1.1.1:80。  | 
                           
                        |
| apiGatewayEndpoint | String | 
                               当前 regionId 所对应的 IoT 网关的接入点,例如 api-performance.aliplus.com。  | 
                           
                        |
| oaApiGatewayEndpoint | String | 
                               当前 regionId 所对应的 OA 登录接口所使用的阿里云网关的接入点,例如 sdk.openaccount.aliyun.com。  | 
                           
                        |
| regionEnglishName | String | 
                               regionId 对应的英文名称,例如 China, Singapore, Germany。  | 
                           
                        |
| pushChannelEndpoint | String | 
                               push 通道的接入点。  | 
                           
                        |
| shortRegionId | String | 
                               regionId短编码。  | 
                           
                        
示例
请求示例
{
	"id": "1509086454180",
	"version": "1.0",
	"request":{
		"apiVer": "1.0.2"
	},
	"params":{
		"type": "PHONE",
		"countryCode": "CN",
		"phone": "111222****",
		"email": "xxx@xxx.com",
		"authCode": "value4",
		"phoneLocationCode": "86"
	}
}
                  正常返回示例
JSON格式
                  
{
    "id":"4de2c367-c1db-417c-aa15-8c585e595d92",
    "code":200,
    "message":null,
    "localizedMsg":null,
    "data":{
        "regionId":"cn-shanghai",
        "regionEnglishName": "China",
        "mqttEndpoint":"ssl://1.1.1.1:80",
        "apiGatewayEndpoint":"api-performance.aliplus.com",
        "oaApiGatewayEndpoint":"sdk.openaccount.aliyun.com",
        "pushChannelEndpoint": "living-accs.eu-central-1.aliyuncs.com"
    }
}
                  异常返回示例
JSON格式
                  
{
    "id": "37f7e5fa-d6a5-4efe-8abf-5bf23dca6284",
    "code": 403,
    "message": "request forbidden.",
    "localizedMsg": "请求被禁止",
    "data": null
}