---
updatedAt: 2026-11-12T11:23:34.000Z
agentTools:
  projectIndex: https://docs.decentro.tech/llms.txt
---

# JWT

# Generate Credentials

`https://in.staging.decentro.tech/v2/auth/token`

Clients can use this API to generate a JSON Web Token (JWT) for secure access to all Decentro Fabric APIs as an alternative to using `client_id` and `client_secret`.

Decentro APIs can be accessed using either of the following methods:

* **Client Credentials**
* **JWT Tokens**

***

## 1. Client Credentials

During onboarding, clients receive credentials specific to the selected modules. If you have not received your credentials, please [sign up here](#).

The credentials provided include:

| Name            | Description                                           |
| --------------- | ----------------------------------------------------- |
| `client_id`     | A unique ID assigned to each client                   |
| `client_secret` | A secret key assigned to access your Decentro account |

> ⚠️ Credentials are platform-specific. Do not share them internally or externally without appropriate authorization.

***

## 2. JWT (JSON Web Token)

JWT (JSON Web Token) is a compact and self-contained mechanism (as per [RFC 7519](https://tools.ietf.org/html/rfc7519)) for securely transmitting information as a JSON object.

JWTs can be generated using the Decentro Auth API with one of the following `grant_type` values:

* `client_credentials`

> ⏳ JWT tokens are valid for **15 minutes** by default.

### How to Use JWT for API Authentication

Once a JWT token is generated using the Decentro Auth API, it can be used to authenticate subsequent requests to supported Decentro Fabric APIs.

To authenticate an API request using JWT, pass the generated token in the Authorization header using the Bearer scheme:

```html
Authorization: Bearer <JWT_TOKEN>
```

Replace \<JWT\_TOKEN> with the JWT returned by the Generate Credentials API.

JWT tokens are valid for 15 minutes by default. Once the token expires, generate a new token before making further API requests.

Alternatively, supported APIs can be authenticated using the client\_id and client\_secret credentials provided by Decentro.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "decentro-staging",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://in.staging.decentro.tech"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/v2/auth/token": {
      "get": {
        "summary": "JWT",
        "description": "",
        "operationId": "jwt",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "grant_type",
                  "client_id",
                  "client_secret",
                  "apis"
                ],
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "description": "Required. Values: client_credentials"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "Required for client_credentials grant type"
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "Required for client_credentials grant type"
                  },
                  "apis": {
                    "type": "array",
                    "description": "List of specific endpoints to access",
                    "items": {
                      "properties": {
                        "endpoint": {
                          "type": "string",
                          "description": "Specific endpoint to access",
                          "default": "/v2/kyc/workflows/uistream\""
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Success": {
                    "value": "{\n    \"response_key\": \"success_login\",\n    \"response_message\": \"User Login successful\",\n    \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc1MzM0ODQyNCwianRpIjoiMDQ0ZmViZTgtNWVkMS00NWJjLTk1MzctMWYwYmQxNDNjZDZhIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6InRlc3RfY2xpZW50X2lkIiwibmJmIjoxNzUzMzQ4NDI0LCJleHAiOjE3NTMzNDkzMjQsInVzZXJfY2xhaW1zIjp7ImNvbXBhbnlfaWQiOjEsIm1vZHVsZV9hY2Nlc3MiOnsiY29yZV9iYW5raW5nIjpbInllc2IiLCJ5ZXNiIiwiaWNpYyIsInV0aWIiLCJkYnNzIiwiaWRmYiJdLCJreWNfYW5kX29uYm9hcmRpbmciOlsieWVzYiIsImljaWMiXSwiYW1sX2FuZF9jb21wbGlhbmNlIjpbXSwicGF5bWVudHMiOlsieWVzYiIsImljaWMiLCJOUFNUIiwib3h5bSJdLCJwcGlfd2FsbGV0IjpbInllc2IiLCJsdnFrIiwidHNjcCJdLCJmaW5hbmNpYWxfc2VydmljZXMiOlsiZXFmeCIsInJwbmYiXSwicHBpX2Z1bGxfa3ljIjpbImx2cWsiLCJ0c2NwIl0sImxlZG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50IjoiL3YyL2t5Yy93b3JrZmxvd3MvdWlzdHJlYW0iLCJxdWVyeV9wYXJhbWV0ZXJzIjpudWxsLCJyZXF1ZXN0X3BheWxvYWQiOm51bGx9XSwicmVzb3VyY2VzIjpudWxsfX0.5IhWk3MX3K1RAvsPHB-lOGv7x-295975kiUvxAOq3Vg\",\n    \"request_urn\": \"8b7b8ccd9f734c0089df6d374a5448cc\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "response_key": {
                      "type": "string",
                      "example": "success_login"
                    },
                    "response_message": {
                      "type": "string",
                      "example": "User Login successful"
                    },
                    "access_token": {
                      "type": "string",
                      "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc1MzM0ODQyNCwianRpIjoiMDQ0ZmViZTgtNWVkMS00NWJjLTk1MzctMWYwYmQxNDNjZDZhIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6InRlc3RfY2xpZW50X2lkIiwibmJmIjoxNzUzMzQ4NDI0LCJleHAiOjE3NTMzNDkzMjQsInVzZXJfY2xhaW1zIjp7ImNvbXBhbnlfaWQiOjEsIm1vZHVsZV9hY2Nlc3MiOnsiY29yZV9iYW5raW5nIjpbInllc2IiLCJ5ZXNiIiwiaWNpYyIsInV0aWIiLCJkYnNzIiwiaWRmYiJdLCJreWNfYW5kX29uYm9hcmRpbmciOlsieWVzYiIsImljaWMiXSwiYW1sX2FuZF9jb21wbGlhbmNlIjpbXSwicGF5bWVudHMiOlsieWVzYiIsImljaWMiLCJOUFNUIiwib3h5bSJdLCJwcGlfd2FsbGV0IjpbInllc2IiLCJsdnFrIiwidHNjcCJdLCJmaW5hbmNpYWxfc2VydmljZXMiOlsiZXFmeCIsInJwbmYiXSwicHBpX2Z1bGxfa3ljIjpbImx2cWsiLCJ0c2NwIl0sImxlZGdlciI6W10sImJ5dGVzIjpbXSwic2Nhbm5lciI6W119LCJncmFudF90eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwiYXBpcyI6W3siZW5kcG9pbnQiOiIvdjIva3ljL3dvcmtmbG93cy91aXN0cmVhbSIsInF1ZXJ5X3BhcmFtZXRlcnMiOm51bGwsInJlcXVlc3RfcGF5bG9hZCI6bnVsbH1dLCJyZXNvdXJjZXMiOm51bGx9fQ.P4_1Drv0mpbHCKt7HI4NtTGk2ZXQ-3WmbGLsT4RM7iA"
                    },
                    "refresh_token": {
                      "type": "string",
                      "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc1MzM0ODQyNCwianRpIjoiNjUwZjI1ZTktOTI5OS00M2FkLTg1OWMtNDQ0MGRkMjM3MDBhIiwidHlwZSI6InJlZnJlc2giLCJzdWIiOiJ0ZXN0X2NsaWVudF9pZCIsIm5iZiI6MTc1MzM0ODQyNCwiZXhwIjoxNzU1OTQwNDI0LCJ1c2VyX2NsYWltcyI6eyJjb21wYW55X2lkIjoxLCJtb2R1bGVfYWNjZXNzIjp7ImNvcmVfYmFua2luZyI6WyJ5ZXNiIiwieWVzYiIsImljaWMiLCJ1dGliIiwiZGJzcyIsImlkZmIiXSwia3ljX2FuZF9vbmJvYXJkaW5nIjpbInllc2IiLCJpY2ljIl0sImFtbF9hbmRfY29tcGxpYW5jZSI6W10sInBheW1lbnRzIjpbInllc2IiLCJpY2ljIiwiTlBTVCIsIm94eW0iXSwicHBpX3dhbGxldCI6WyJ5ZXNiIiwibHZxayIsInRzY3AiXSwiZmluYW5jaWFsX3NlcnZpY2VzIjpbImVxZngiLCJycG5mIl0sInBwaV9mdWxsX2t5YyI6WyJsdnFrIiwidHNjcCJdLCJsZWRnZXIiOltdLCJieXRlcyI6W10sInNjYW5uZXIiOltdfSwiZ3JhbnRfdHlwZSI6ImNsaWVudF9jcmVkZW50aWFscyIsImFwaXMiOlt7ImVuZHBvaW50IjoiL3YyL2t5Yy93b3JrZmxvd3MvdWlzdHJlYW0iLCJxdWVyeV9wYXJhbWV0ZXJzIjpudWxsLCJyZXF1ZXN0X3BheWxvYWQiOm51bGx9XSwicmVzb3VyY2VzIjpudWxsfX0.5IhWk3MX3K1RAvsPHB-lOGv7x-295975kiUvxAOq3Vg"
                    },
                    "request_urn": {
                      "type": "string",
                      "example": "8b7b8ccd9f734c0089df6d374a5448cc"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Bad Request": {
                    "value": "{\n    \"response_message\": \"Invalid client_id or client_secret\",\n    \"response_key\": \"invalid_client_credentials\",\n    \"request_urn\": \"ffabd2beb35443e4b76b9eb89384c959\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "response_message": {
                      "type": "string",
                      "example": "Invalid client_id or client_secret"
                    },
                    "response_key": {
                      "type": "string",
                      "example": "invalid_client_credentials"
                    },
                    "request_urn": {
                      "type": "string",
                      "example": "ffabd2beb35443e4b76b9eb89384c959"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```