Working with Tokens

Requesting a Token

Tokens can be requested in the following manner

curl --request POST \
  --url https://api.servetel.in/v1/auth/login \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"email":"[email protected]","password":"yourpasswordhere"}'

Refreshing a Token

Tokens have a lifetime of 60 minutes, after which, you will have to request a refresh token, like in the example below.

curl --request POST \
  --url https://api.servetel.in/v1/auth/refresh \
  --header 'accept: application/json' \
  --header 'authorization: Bearer yourtokenhere'