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
user_id
string
Masi unique id
string
email address of the user
client_secret
string
a unique id to identify the client requesting for login
Response
The response returns an Bearer access_token
Success (200): Returns a
Bearertoken for authentication.code: 200message: "Success"token_type: "Bearer"access_token:<access_token>
Error (401): Authentication failed.
code: 401success: falsemessage: "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