@kinghan
2015-02-10T08:00:40.000000Z
字数 3189
阅读 1037
账号系统 接口 文档
DOMAIN = https://account.moretv.com.cn
{"status":200,"errcode":1,"message":"Email可以使用"}
| errcode | message |
|---|---|
| 1 | Email 可以使用 |
| -4 | Email格式有误 |
| -5 | Email不允许注册 |
| -6 | 该Email已经被注册 |
Find password email
api: {DOMAIN}/eamil/resetpasword/{EMAIL}
method: GET
注: email 为 urlencode(base64_encode(email))
Send email code
api: {DOMAIN}/email/sendCode/{EMAIL}?type={TYPE}
method: GET
注: email 为urlencode(base64_encode(email))
| type | |
|---|---|
| bind | 发送绑定新邮箱验证码 |
| change | 发送修改邮箱验证码 |
{"status":200,"errcode":0,"message":"匹配"}
| status | errcode | message |
|---|---|---|
| 200 | -1 | 验证码已失效 |
| 200 | 0 | 匹配 |
| 200 | -2 | 不匹配 |
Generate
api: {DOMAIN}/captcha/generate
method: GET
output: png image
Validate
api: {DOMAIN}/captcha/validate/{CODE}
method: GET
output: json
{"status":200,"errcode":-1,"message":"验证码不匹配"}
| errcode | message |
|---|---|
| -1 | 验证码不匹配 |
| 1 | 验证码匹配 |
Register
api: {DOMAIN}/user/register
method: POST
required param: email nickname password captcha
optional param: callback(回跳url)
output: text/html
Login
api: {DOMAIN}/user/login
method: POST
required param: email password auto_login
output: json
{"status":0,"err_msg":"",}
| status | err_msg |
|---|---|
| -2 | email或password为空 |
| -1 | email或密码错误 |
| 0 | 空 |
Login
api: {DOMAIN}/sns/login/preauth?redirect_url={REDIRECT_URL}&type={TYPE}
method: GET
required param: type(qq wb db wx)
output: text/html
Fill userinfo
api: {DOMAIN}/sns/login/fill?openid={OPENID}
method: GET
required param: openid
output: text/html
注: openid为 urlencode(base64encode(db_openid))
Bind
api: {DOMIAN}/sns/login/preauth?redirect_url={REDIRECT_URL}&type={TYPE}&action=bind
method: GET
required param: action type(db wb qq wx)
ouput: text/html
Unbind
api: {DOMAIN}/sns/login/unbind?type={TYPE}
method: GET
required param: type(wx wb qq db)
output: none
Find password
api: {DOMAIN}/user/forgetPassword
method:POST
required param: email
output: text/html
Reset password
api: {DOMAIN}/user/resetPassword
method: POST
required param: password
output: text/html
Change password
api: {DOMAIN}/userInfo/changePassword
method: POST
required param: oldpwd newpwd confirmpwd
output: json
{"status":200,"errcode":1,"message":"成功修改密码"}
| errcode | message |
|---|---|
| -3 | 您还未登陆,请登陆 |
| 1 | 成功更改密码 |
| 0 | 没有做任何修改 |
| -1 | 修改密码失败 |
{"status":200,"errcode":0,"message":"上传成功"}
| errcode | message |
|---|---|
| -3 | 您还未登陆,请先登陆 |
| -2 | 格式不匹配 |
| -1 | 文件过大 |
| 0 | 上传成功 |
{"status":200,"errcode":0,"message":"avatar url"}
| errcode | message |
|---|---|
| -2 | 您还未登陆,请先登陆 |
| 0 | avatar url |
{"status":200,"errcode":1,"message":"已成功更改用户信息"}
| errcode | message |
|---|---|
| 1 | 已成功修改用户信息 |
| -1 | 修改失败 |
| -2 | 您还未登陆,请登陆 |
* Change Email
api: {DOMAIN}/userInfo/changeEmail
Method: POST
required param: email code
output: json
{"status":200,"errcode":1,"message": "修改成功"}
| status | errcode | message |
|---|---|---|
| 200 | -3 | 您还未登陆,请登陆 |
| 200 | 1 | 更新成功 |
| 200 | 0 | 没有做任何修改 |
| 200 | -4 | Email格式有误 |
| 200 | -5 | Email不允许注册 |
| 200 | -6 | 该Email已经被注册 |
| 200 | -9 | 验证码不匹配 |
作者: king.han
邮箱: steven_hl@163.com
2015 年 2 月 10 日