Login

This endpoint allows you to retrieve the access token which is used in the header of every call.

User Login

POST https://api.aitrade.com/api/login

Request Body

Name
Type
Required
Description

user_id

string

Masi unique id

email

string

email address of the user

client_secret

string

a unique id to identify the client requesting for login

Please contact us for client_secret

Response

The response returns an Bearer access_token

  • Success (200): Returns a Bearer token for authentication.

    • code: 200

    • message: "Success"

    • token_type: "Bearer"

    • access_token: <access_token>

  • Error (401): Authentication failed.

    • code: 401

    • success: false

    • message: "Unauthenticated."

Sample Response JSON

Header

Once you have received a successful response containing the access token, you will need to include this token in the Authorization header of subsequent requests. This is done by setting the header to Bearer <access_token>, where <access_token> is replaced with the token you received. This method ensures that your requests are authenticated and processed correctly.

Last updated