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"}'

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:

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
successThe token generate status.Boolean
access_tokenThe generated access token. Copy this code and use it in all your APIs which ask for authorization.String
token_typeThe type of the token generated.String
expires_inThe 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.

Language
Click Try It! to start a request and see the response here!