Generate a Token

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:

VariableDescriptionData Type
emailThe login ID of the client.String
passwordThe 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:

VariablesDescriptionData Type
successIndicates the status of the token generation. The value of this parameter will be either True or FalseBoolean
access_tokenThe generated access token. Copy this code and use it in all your APIs requesting authorization.String
token_typeThe type of the token generated (Bearer)String
expires_inThe time (Seconds) for which the token is valid.Number
number_of_days_leftIndicates 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"
}
Language
Click Try It! to start a request and see the response here!