-
Notifications
You must be signed in to change notification settings - Fork 9
User
Zijun Chen edited this page Mar 26, 2019
·
4 revisions
retrieve basic info of the current user
| Method | Path | Auth |
|---|---|---|
| POST | v1/user/info | User |
Request Parameters
| Parameter | Type | Optional | Data Type | Description |
|---|---|---|---|---|
| - | - | - | - | - |
v1/user/info?
Possible Error Codes
| Error Code | Description | Note |
|---|---|---|
| - | - | - |
Success Example
{
"code": 0,
"msg": "OK",
"data": {
"email": "[email protected]"
}
}generate verification code and sent to the user by email
| Method | Path | Auth |
|---|---|---|
| POST | v1/get_verification | - |
Request Parameters
| Parameter | Type | Optional | Data Type | Description |
|---|---|---|---|---|
| Query String | - | String | Email address |
Possible Error Codes
| Error Code | Description | Note |
|---|---|---|
| -2 | Wrong parameter | - |
| -6 | Record already exists | - |
Success Example
{
"code": 0,
"msg": "OK",
}register a new user
| Method | Path | Auth |
|---|---|---|
| POST | v1/create_user | - |
Request Parameters
| Parameter | Type | Optional | Data Type | Description |
|---|---|---|---|---|
| Query String | - | String | Email address | |
| verification | Query String | - | String | Verification code |
| password | Post Form | - | String | Password |
v1/[email protected]&verification=737475
Possible Error Codes
| Error Code | Description | Note |
|---|---|---|
| -1 | Authorisation error | Wrong verification code |
| -2 | Wrong parameter | - |
| -6 | Record already exists | - |
Success Example
{
"code": 0,
"msg": "OK",
}| Method | Path | Auth |
|---|---|---|
| POST | v1/login | - |
Request Parameters
| Parameter | Type | Optional | Data Type | Description |
|---|---|---|---|---|
| Query String | - | String | Email address | |
| password | Post Form | - | String | Password |
Possible Error Codes
| Error Code | Description | Note |
|---|---|---|
| -1 | Authorisation error | - |
| -2 | Wrong parameter | - |
| -4 | Exceeded limits | - |
| -5 | Record does not exist | - |
Success Example
{
"code": 0,
"msg": "OK",
"data": {
"token": "eyJhbGciOiJ......6rY7GEfg-c"
}
}