Skip to content
Zijun Chen edited this page Mar 26, 2019 · 4 revisions

Info

retrieve basic info of the current user

Method Path Auth
POST v1/user/info User

Request

Request Parameters
Parameter Type Optional Data Type Description
- - - - -

v1/user/info?

Response

Possible Error Codes
Error Code Description Note
- - -

Success Example

{
    "code": 0,
    "msg": "OK",
    "data": {
        "email": "[email protected]"
    }
}

Get verification

generate verification code and sent to the user by email

Method Path Auth
POST v1/get_verification -

Request

Request Parameters
Parameter Type Optional Data Type Description
email Query String - String Email address

Response

Possible Error Codes
Error Code Description Note
-2 Wrong parameter -
-6 Record already exists -

Success Example

{
    "code": 0,
    "msg": "OK",
}

Create user

register a new user

Method Path Auth
POST v1/create_user -

Request

Request Parameters
Parameter Type Optional Data Type Description
email Query String - String Email address
verification Query String - String Verification code
password Post Form - String Password

v1/[email protected]&verification=737475

Response

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",
}

Login

Method Path Auth
POST v1/login -

Request

Request Parameters
Parameter Type Optional Data Type Description
email Query String - String Email address
password Post Form - String Password

Response

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"
    }
}

Clone this wiki locally