更新用户手机号
接口说明
更新当前登录用户的手机号码
该接口需要在APP后台启用登录
请求路径
Method |
URI Path |
鉴权方式 |
POST |
/v1/user/mobile |
Token认证 |
请求参数
公共参数
参数名 |
类型 |
取值范围 |
是否必须 |
说明 |
Authorization |
string |
Bearer + token |
是 |
登录令牌,Header传值,格式:Bearer eyJxx... |
业务参数
参数名 |
类型 |
取值范围 |
是否必须 |
说明 |
mcode |
string |
格式:+xx |
是 |
国际电话区号,如:+86 |
mobile |
string |
手机号码格式 |
是 |
手机号码,中国大陆为11位数字 |
verify_code |
string |
最大6位字符 |
是 |
短信验证码 |
请求示例代码
- application/x-www-form-urlencoded方式
curl --location --request POST 'https://api.zaihangyun.com/v1/user/mobile' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Authorization: Bearer ZaihangyunToken' \
--header 'Accept: */*' \
--header 'Host: api.zaihangyun.com' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'mcode=+86' \
--data-urlencode 'mobile=18518768888' \
--data-urlencode 'verify_code=347823'
curl --location --request POST 'https://api.zaihangyun.com/v1/user/mobile' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ZaihangyunToken' \
--header 'Accept: */*' \
--header 'Host: api.zaihangyun.com' \
--header 'Connection: keep-alive' \
--data-raw '{
"mcode": "+86",
"mobile": "18518768888",
"verify_code": "347823"
}'
{warning} json方式请一定要在header中声明:Content-Type: application/json
返回响应
{
"code": 200,
"msg": "success"
}
{
"code": "400107",
"msg": "mobile must be valid"
}
错误码说明
查看全局错误码
错误码 |
说明 |
400104 |
mcode参数缺失 |
400105 |
mcode格式不正确 |
400106 |
mobile参数缺失 |
400107 |
mobile格式不正确 |
400108 |
verify_code参数缺失 |
400109 |
verify_code参数类型必须是字符串 |
400110 |
verify_code长度不能超过6个字符 |
400190 |
验证码错误 |
400191 |
验证码已过期 |