@cfygaoyang
2018-01-18T06:05:54.000000Z
字数 1961
阅读 419
sds
GET /api/get_verify_code?account=18888888888&appid=xxx-xxx-xx-xx
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| account | 字符串 | 是 | 手机或邮箱 |
| appid | 字符串 | 是 | appid |
{"meta": {"message": "Send message to phone successfully.","code": 0},"data": {}}
GET /api/get_token?account=18888888888&verify_code=123456&appid=xxxx-xxx-xxx-xxx
GET /api/get_token?account=18888888888&password=123456&appid=xxxx-xxx-xxx-xxx
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| account | 字符串 | 是 | 手机或邮箱 |
| verify_code | 字符串 | 是 | 验证码 |
| appid | 字符串 | 是 | 厂商的APPID |
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| account | 字符串 | 是 | 手机或邮箱 |
| password | 字符串 | 是 | 密码 |
| appid | 字符串 | 是 | 厂商的APPID |
* 请求回调
{"meta": {"message": "ok","code": 0},"data": {"token": {token},"clientid": {clientid}}}
| 参数 | 类型 | 说明 |
|---|---|---|
| token_expire_in | 整形 | token有效时间(秒) |
| token | 字符串 | token |
| refresh_token_expire_in | 整形 | refresh_token有效时间(秒) |
| refresh_token | 字符串 | refresh_token |
PUT /api/reset_token
{"refresh_token": {token}}
{"meta": {"message": "ok","code": 0},"data": {"token": {token},"clientid": {clientid}}}
| 参数 | 类型 | 说明 |
|---|---|---|
| token_expire_in | 整形 | token有效时间(秒) |
| token | 字符串 | token |
| refresh_token_expire_in | 整形 | refresh_token有效时间(秒) |
| refresh_token | 字符串 | refresh_token |
PUT /api/user/reset_password
{"Authorization" : {token}}
{"user_password": "1234567890"}
{"meta": {"message": "Update password successfully.","code": 0},"data": {}}
GET /api/user/message
{"Authorization" : {token}}
{"meta": {"message": "success to user info","code": 0},"data": {"enduserid": "a6867fc0fa8b11e7a2d7c85b76a99e00","last_login": "2018-01-18T10:16:15.054000","phone": "12312312311","phonearea": "+86","phoneverified": true,"email": "","emailverified": false,"nickname": "123","realname": "可以","gender": "男","city": "可以","avatar": "","note": "","is_active": true,"date_joined": "2018-01-16T15:05:35.932000","is_virtual": false,"principal": "","isonline": false,"onlinetimes": 0,"app": {appid}}}
PUT /api/user/message
{"Authorization" : {token}}
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| nickname | 字符串 | 否 | 昵称 |
| realname | 字符串 | 否 | 真实姓名 |
| gender | 字符串 | 否 | 性别 |
| city | 字符串 | 否 | 城市 |
| avatar | 字符串 | 否 | 头像url |
| note | 字符串 | 否 | 备注 |
备注:不修改的参数不需要填写
{"meta": {"message": "success","code": 0},"data": {"nickname": "123","realname": "可以","gender": "男","city": "可以","avatar": "","note": ""}}