post https://api-smartflo.tatateleservices.com/v1/auth/login
This API allows you to generate an authentication token.
Requesting a Token
You can request the token in the following manner:
curl --request POST \
--url https://api-smartflo.tatateleservices.com/v1/auth/login \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"email":"[email protected]","password":"password"}'
The below video illustrates the token fetching mechanism to get a short-lived token.
Let's understand the Request and Response Variables in detail.
Request Variables (Body Params)
You can retrieve the access token by entering the below-mentioned values in the Request Variables:
Variable | Description | Data Type |
---|---|---|
The login ID of the client. | String | |
password | The password of the client. | String |
Response Variables
When the Request Variables are parsed, you will get Response Variables in return. They will contain the unique access token which can be used for running an API.
The response variables are as following:
Variables | Description | Data Type |
---|---|---|
success | The token generate status. | Boolean |
access_token | The generated access token. Copy this code and use it in all your APIs which ask for authorization. | String |
token_type | The type of the token generated. | String |
expires_in | The time for which the token is valid. | Number |
Using the API Token
Once you have the access token, refer to the video to learn how to run an API using the token.