Users management

Endpoints related with users management such as login or user update.

Log In

POST https://api.expai.io/api/auth/login

This endpoint allows you to login and get your JWT token that will be used to authorise your operations. Every time you log in, previous tokens generated through the API will be revoked.

Headers

NameTypeDescription

Content-Type

string

Value: "application/json"

Request Body

NameTypeDescription

password_des

string

Password for your account

email_des

string

Your email registered at EXPAI

{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNDYxNDVhZmUtYjQwMC00OGVmLWE4MTgtYWJlODhiM2RiYWUzIiwiZXhwIjoxNjE5NDUxNDczfQ.XEtQm_Iv046PL2xJI2Urq1gJ9IHLD-uNI51HwoClqlo",
    "code": "success",
    "http_code": 200,
    "message": "success"
}

Log Out

POST https://api.expai.io/api/auth/logout

Logout from your account and revoke your active JWT token.

Headers

NameTypeDescription

access-token

string

Active JWT token obtained during login

{
    "code": "success",
    "http_code": 200,
    "message": "success"
}

Update User

PATCH https://api.expai.io/api/users/<user-id>

This endpoint allows you to login and get your JWT token that will be used to authorise your operations. Every time you log in, previous tokens generated through the API will be revoked.

Path Parameters

NameTypeDescription

user-id

string

Unique ID that identifies your user

Headers

NameTypeDescription

access-token

string

Active JWT token

content-type

string

Value: "application/json"

Request Body

NameTypeDescription

name_des

string

New name for the user

surname_des

string

New surname for the user

email_des

string

New email for the account

{
    "code": "success",
    "http_code": 200,
    "message": "success"
}

Update Password

POST https://api.expai.io/api/users/update_password

Update password for your user

Headers

NameTypeDescription

access-token

string

Active JWT token

Content-Type

string

Value: "application/json"

Request Body

NameTypeDescription

new_password_des

string

New password

password_des

string

Old password

{
    "code": "success",
    "http_code": 200,
    "message": "success"
}

Create user from license

POST https://api.expai.io/api/users/create_user_from_license

Update password for your user

Headers

NameTypeDescription

Content-Type

string

Value: "application/json"

Request Body

NameTypeDescription

captcha_token_des

string

Valid captcha token to validate human users

name_des

string

Name

surname_des

string

Surname

email_des

string

User email

password_des

string

Password for the user

license_key_des

string

Valid EXPAI license key

{
    "code": "success",
    "http_code": 200,
    "message": "success"
}

Last updated