1. Home
  2. Docs
  3. API Documentation
  4. How to Generate your Access Token and Refresh Token

How to Generate your Access Token and Refresh Token

To generate “Access Token”, follow the steps below:

  1. Open API Testing Tool:
    • Launch your API testing tool, such as Postman.
  2. Create a New Request:
    • Create a new request in the tool for the API you want to test.
  3. Configure Authorization:
    • Click on the “Authorization” section in your request tab.
  4. Select OAuth 2.0 as the Authorization Type:
    • In the Authorization section, choose “OAuth 2.0” as the authorization type.
  5. Generate a New Token:
    • In the OAuth 2.0 section, you should see an option called “Generate New Token.”
    • In that section, you need to add Request Parameters as mentioned below:

 

REQUEST PARAMETERS

Token Name:
  • Enter the Token Name
Grant Type:
  • Select the value  “Authorization Code (With PKCE)”
Callback URL:
  • Specify the Callback URL that you registered during the app registration.

  • For ex: In the case of Postman we have an option called, “Authorize using Browser” If selected, it will give you default callback URL otherwise, you have an option to add your custom Callback URL.

  • Ensure that the Callback URL is the same as the one used earlier when generating your Client ID and Client Secret.
Auth URL: 
  • Specify the end points that we are using for Authorization Server. It will be used to get an Authorization Code.
  • For example: we can use ” https://accounts.vryno.com/oidc/auth “.
Access Token URL:
  • Specify the end points that we are using for Authorization Server. It will be used to exchange the Authorization code for an Access Token .
  • For example: we can use ” https://accounts.vryno.com/oidc/token “.
Client ID:
  • Specify Client ID obtained from the app registration.
Client Secret:
  • Specify Client secret obtained from the app registration.
Code Challenge Method:
  • Select the value as “SHA-256”
Scope
  • Enter the value as “openid vryno_offline_access”.

 

These steps will help you configure your API request using OAuth 2.0 with your Client ID and Secret for authentication and authorization.

Once you have entered all the information, you need to scroll down and click on, “Get New Access Token”.

You will be redirected to the browser for an Authentication and once your call is authenticated you will be able to see the attached  screenshot.

Once Authenticated, it will redirect to the Postman app and you will be able to see your token details such as Access Token and Refresh Token, as shown below

If you want to use the token, click on the ‘Use Token’ button located at the top right corner, and the token will be added to your API request.

 

 

 

 

 

How can we help?