How-To Guides
How to Create and Use OAuth 2.0 Tokens in Litmus Edge
2min
You can create and use OAuth 2.0 tokens for accessing Litmus Edge APIs.
To create an OAuth 2.0 token:
- Navigate to System > Access Control > Tokens.
Click on Add API Credentials.
Select OAuth 2.0 Client as the type of credentials.
- Configure the following token settings:
- Provide a Token Name.
- Assign the token to appropriate RBAC (Role-Based Access Control) groups.
- (Optional) Set an Expiration Date for the token.
- Define the Access Token Lifespan in minutes.
Click Add.
- Litmus Edge will generate Client ID and Client Secret.
Copy and securely store the Client ID and Client Secret. These values are shown only once.
To use OAuth 2.0 token with postman:
Click New Request.
- Create a new request and select either GET or POST based on your needs.
- Navigate to the Authorization tab.
Select OAuth 2.0 from the Auth Type dropdown.
- Under Configure New Token:
- Token Name: Enter a name for this token configuration.
- Grant Type: Select Client Credentials.
- Access Token URL: Enter the token endpoint: https://<Litmus Edge URL>/api/v3/oauth/token.
- Client ID: Enter the Client ID generated in Litmus Edge.
- Client Secret: Enter the Client Secret generated in Litmus Edge.
- Scope: Leave this field empty (if not required).
Client Authentication: Choose Send as Basic Auth header.
- Click on Get New Access Token:
- Postman will retrieve the token and display it in the Access Token field.
- Add the Authorization Token to your request:
- The token will be automatically added to the headers by Postman.
- Click Send to execute the API request.
- Verify the response from the server.