Generate Credentials v3

Clients can use this API to generate a JSON Web Token for secure access to all v3 APIs as an alternative to client_id & client_secret.

Clients can access all v3 Decentro APIs through two primary methods. Either method can be used to access the APIs. The available methods are:

  1. Client Credentials
  2. JWT tokens

1. Client Credentials

While you are onboarded on the Decentro environment by our team, you will receive the credentials for your company basis the modules you've chosen to go with. If you haven't got your credentials yet, you can get them by signing up here.

You'll get the below important credentials for each module that you choose -

NameDescription
client_idThis is a unique id assigned to each client
client_secretThis is a client-specific password/secret_key to access the account

Clients are required to pass client_id and client_secret in the headers to access the APIs.

Please note that the credentials are unique to a platform and should not be shared within the organization without consent or with any external partners.

2. JWT

JWT stands for JSON Web Token. It is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.

  • Customers can generate JWT using our Auth API with various grant types in the request body.
  • Customers can pass the grant_type as
    • client_credentials
    • refresh_token
  • The JWT token is valid for 15 minutes by default

Generate JWT with Client Credentials

Customers can generate JWT with Client Credentials -

Request ParameterDescription
grant_typeTo generate JWT with client credentials, customers need to pass grant_type as client_credentials
client_idThe client id generated for the customer at Decentro
client_secretThe client secret generated for the customer at Decentro

Generate JWT with Refresh Token

Customers can generate JWT with Refresh Token -

Request ParameterDescription
grant_typeTo generate JWT with refresh token, customers need to pass grant_type as refresh_token
refresh_tokenThe refresh token that was generated while creating JWT

How to use JWT in Decentro APIs?

Once customers generate JWT, they can use this instead of client_id and client_secret in API Authorization.

  • Customers can pass JWT in headers instead of client_id and client_secret to access the API.
  • Customers should use 'Bearer token' as the Auth type.
  • All our APIs will work with both the methods, Client Credentials, and JWT.
Language
Click Try It! to start a request and see the response here!