V1/login/phone locate password

来自技术开发小组内部wiki
跳转至: 导航搜索

功能说明

用户手机号找回密码(修改密码)接口 本接口是全平台通用的,即发送请求后,可根据请求中传入的"phone_num","password","invitation"平台参数返回发送状态。


URL

正式环境
http://api.fumubang.com/v1/login/phone_locate_password
测试环境
http://api.fumubang.net/v1/login/phone_locate_password

格式

json

HTTP请求方式

POST

输入参数说明

phone_num
参数名称 是否必须 类型 描述
phone_num 必须 string 以json格式POST传入,用户输入的手机号
password 必须 string 以json格式POST传入,用户输入密码
invitation 必须 string 以json格式POST传入,用户输入的短信验证码

请求示例

http://api.fumubang.com/v1/login/phone_locate_password

openid=xxxxxxx 父母邦分配

openkey=xxxxxxxx 父母邦分配

phone_num = xxxxxx 用户输入手机号

password = xxxxxx 用户输入密码

invitation = xxxxxx 用户输入的短信验证码


参数用POST方式提交

返回方式说明

xml或json

正确返回说明

<status>success</status>
<msg>新密码已经发到你的手机</msg>

错误返回示例

参数不全

<error_code>300000</error_code>
<error_msg>参数不全</error_msg>

手机号码格式不对

<error_code>300001</error_code>
<error_msg>手机号码格式不对</error_msg>

手机号未注册

<error_code>300002</error_code>
<error_msg>手机号未注册</error_msg>

验证码不正确

<error_code>300003</error_code>
<error_msg>验证码不正确</error_msg>

手机找回密码失败

<error_code>300004</error_code>
<error_msg>手机找回密码失败</error_msg>

密码发送手机失败

<error_code>300005</error_code>
<error_msg>密码发送手机失败</error_msg>

验证码失效

<error_code>300006</error_code>
<error_msg>验证码失效</error_msg>

示例代码