用户IP地址定位 
获取用户 IP 地址位置 
C2S GET /bp/ip2location/ipv4 
S2S GET /bp/server/user/{user_id}/ip2location/ipv4 
接口功能:根据用户 IP 地址获取其地理位置信息。
注意
- 通过请求头中的 X-Forwarded-For 字段获取用户的 IP 地址。
 - S2S 接口不校验 user_id,可以传递任何不为空字符串,示例 /bp/server/user/a/ip2location/ipv4
 
请求头部参数 (Headers): 
C2S 请求头部参数 
- X-BytePower-Sign:请求体签名
 
S2S 请求头部参数 
- X-BytePower-Auth-Token:服务端认证 Token。
 
请求体 (Body):无 
响应 
HTTP 状态码:200
描述:请求成功 响应示例:
参数类型
名字 类型 示例 是否必填 描述 country_code string CN true 国家代码 country_name string China true 国家名称 region string Yunnan true 地区/省份名称 city string Kunming true 城市名称 ip string 220.165.252.201 true IP 地址 latitude string 25.01497 true 纬度 longitude string 102.74362 true 经度 zip_code string 650000 true 城市邮编 
json
{
  "city": "Kunming",
  "country_code": "CN",
  "country_name": "China",
  "ip": "220.165.252.201",
  "latitude": "25.01497",
  "longitude": "102.74362",
  "region": "Yunnan",
  "zip_code": "650000"
}HTTP 状态码:4xx 描述:错误 响应示例:
json
{
  "error": {
    "error_type": "invalid_parameter",
    "message": "xxxxx"
  }
}error_type:
- invalid_parameter(参数错误,比如解析不到用户 ip)
 - backend unavailable(服务出现错误,此接口极少情况会出现)
 
