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 generating an oauth 2 0 token in litmus edge 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 using oauth 2 0 token with postman to use oauth 2 0 token with postman open 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>/auth/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