Common

Ping

GET /

- Body
    - **name** `string` Host, pod name
    - **ip** `string` Real IP
    - **now** `date` Current time
    - **values** `object` The node is runtime configured and returned when Mode != release

Login

POST /login

Request Body

NameTypeDescription

email*

String

password*

String

SMS Login Code

GET /login/sms

SMS Login

POST /login/sms

Request Body

NameTypeDescription

phone*

String

code*

String

sms login code

TOTP Login

POST /login/totp

Request Body

NameTypeDescription

email*

String

code*

String

Totp Code

Reset Password Code

GET /forget_code

Query Parameters

NameTypeDescription

email*

String

Reset Password

POST /forget_reset

Request Body

NameTypeDescription

email*

String

code*

String

Reset password code

password*

String

Reset password

Verify

GET /verify

Token Refresh Code

GET /refresh_code

- Body
    - **code** `string`

Refresh Token

GET /refresh_token

Request Body

NameTypeDescription

code*

String

Token refresh code

Logout

POST /logout

User Info

GET /user

- Body
    - **_id** `string` User ID
    - **email** `string` User email
    - **name** `string` User name
    - **avatar** `string` User avatar
    - **phone** `string` Phone settings status
    - **sessions** `number` Total number of sessions
    - **history** `object` Recent login history
    - **totp** `string` TOTP settings status
    - **lark** `object` Lark info
    - **status** `bool` User status
    - **create_time** `date`
    - **update_time** `date`

Set User

PATCH /user

Request Body

NameTypeDescription

key*

String

Email|Name|Avatar Specify updated field

email

String

RequiredIf: key=Email

name

String

RequiredIf: key=Name

avatar

String

RequiredIf: key=Avatar

Set Password

POST /user/password

Request Body

NameTypeDescription

old*

String

Old password

password*

String

New password

User SMS Code

GET /user/phone_code

Bind User's Phone

POST /user/phone

Request Body

NameTypeDescription

phone*

String

Phone number

code*

String

SMS code

Generate TOTP URL

GET /user/totp

- Body
    - **totp** `string` TOTP URL

Bind TOTP

POST /user/totp

Request Body

NameTypeDescription

totp*

String

TOTP URL

tss*

String[]

Two consecutive code

Unset User

DELETE /user/:key

Path Parameters

NameTypeDescription

key*

String

phone|totp|lark Specify updated field

Load Option

GET /options

Query Parameters

NameTypeDescription

type*

String

Type, include: upload、collaboration、generate-secret

Last updated