Generate Access Token

This page will help you get started with Authentication API.

Overview

HTTP Method: POST

Endpoint URL: https://api.impexdocs.com/auth

Authentication: Not Required

Response Format: JSON

Description

To generate token, we will be using ‘Client_id’ and ‘Client Secret Key’ credentials. “Client Secret Key” is getting generated through and maintained in ‘Keycloak’ server (which is a standalone tool for identity and access management).

The generated Access Token is of 'Bearer' token type. It contain the required information in encrypted format.

Request

To generate access token, provide the following mandatory inputs:

  1. Client Id (client_id):

  2. Client Secret (client_secret):

Response

The API will respond with a JSON object containing the following main fields:

  • Access Token
  • Expires In
  • Token Type

Example Response JSON

{
  "access_token": "eyJhbGciOiJSUz1gTsInR5cCIgOiAiSldUIiwia2lkIiA6ICJYOGhhMGlKQTJ2TUZCRExmNzkxdUVMMVFmWTFmV3hfR2NnU3QxTXJGZnF3In0.eyJleHAiOjE3MDM4NzEzNzQsImlhdCI6MTcwMzg0MjU3NCwianRpIjoiNjU4ZDkwNmUtNmRjZS00MGYxLWEwYjMtZDEwYmQ4ZTZjYmQxIiwiaXNzIjoiaHR0cHM6Ly9pZC5pbXBleGRvY3MuY29tL3JlYWxtcy9pbXBleCIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJmYTZhOGQ4Yy1jM2Y4LTQ3YWYtYjFhMC02ZGQzNjQ4MDc0YzQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiIxMTQ1IiwiYWNyIjoiMSIsInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIiwiZGVmYXVsdC1yb2xlcy1pbXBleCJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IjExNDUiOnsicm9sZXMiOlsidW1hX3Byb3RlY3Rpb24iXX0sImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoicHJvZmlsZSBlbWFpbCIsImNsaWVudEhvc3QiOiIxODAuMTUxLjIzMy4xNjIiLCJjbGllbnRJZCI6IjExNDUiLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsInByZWZlcnJlZF91c2VybmFtZSI6InNlcnZpY2UtYWNjb3VudC0xMTQ1IiwiY2xpZW50QWRkcmVzcyI6IjE4MC4xNTEuMjMzLjE2MiJ9.KcrJfJk418bk0BWHn0wloqqc8V1sLphNvERXStWvdHV0V8wyQpuQ8QeDbk7w0nBSOxTzIOwhQTP5ymqC2wmWnSHXEzqhRZZqBTUaW3WAJZUfQZy340iqeCOWPQgyAE1dsawvDBAHkZXTFMWdcmvmEpPFJXceg57N8CaPgZetaLF6iiwo7kiLY0tZlABrGouv1jsjYV-ZBmCk3JjPxSAj787y6PXWVyJ8WAd2-th6T73XvMpdhxPxKycl_JOCEVD9tPZs0dMZaREW4sXmYIAQ4aEwGYQBAsGsn_ev_cE91qc6zh7Scs8OST1NoJqQnGW_M7iCigqDsVlt4FyGRjAPlA",
  "expires_in": 28800,
  "refresh_expires_in": 0,
  "token_type": "Bearer",
  "not-before-policy": 1669045051,
  "scope": "profile email"
}

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