Generate Bearer Token Using API Credentials

Generate Bearer Token Using API Credentials

Tech

 

Once you get API credentials for a specific product, you will need to generate bearer token for accessing the APIs.  Please find below the steps for the same.

Step #1 Download Postman Collection

 If you do not have the postman tool installed, refer to download instructions and install Postman.

Step #2 Get API product credentials for token generation

You can access API Key, Okta Client ID, Okta Client Secret, Okta scope, and Okta URL from Dashboard - My Apps.

Dashboard My Apps

Step #3 Generate Bearer Token

Now you are ready to generate token. To generate a bearer token to access all the APIs and/or endpoints in the collection, please follow the below steps.

POSTMAN Authorization
  • Enter okta URL in the postman address bar.
  • On the Authorization tab, select Basic Auth as type.
  • Enter your Okta credentials as Username (Okta Client ID) & Password (Okta Client secret).
POSTMAN Request Body
  • On the Body tab, select x-www-form-urlencoded.
  • Enter the following values:
    • grant_type - client_credentials.
    • scope - Enter Okta Scope.
POSTMAN Response Body
  • Select the Send button.
  • Bearer token is now generated and shown as access_token. You can copy the access_token value for testing APIs in the collection. 

 

You are all set, you can now use Anywhere API product. 

 

Reference - https://www.postman.com

Was this helpful? dislike