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"}'
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 | Indicates the status of the token generation. The value of this parameter will be either True or False | Boolean |
access_token | The generated access token. Copy this code and use it in all your APIs requesting authorization. | String |
token_type | The type of the token generated (Bearer) | String |
expires_in | The time (Seconds) for which the token is valid. | Number |
number_of_days_left | Indicates how many days remain before your password expires, based on the 90-day password reset policy. | Number |
Success Respone
{
""success"": true,
""access_token"": ""eyJ0eXAiOiJKV1XXXXXXXXXXXXy_geJMxZywZb9v6M0igZkKTuys8"",
""token_type"": ""bearer"",
""expires_in"": 3600,
""number_of_days_left"": 30
}
Failed Responses
{
"success": false,
"message": "The username or password is incorrect.",
"login_failed_count": 1
}
OR
{
"success": false,
"message": "Invalid credentials"
}