My current project is Oauth 2.0 autho based.At postman,I can generate accesstoken using #Getnewaccesstoken button for my collection.
I dont want to click the generate token button in every time...Is any option there in prerequiste script form for automating this step...
Yes, you can use an
access tokento assignvariable.Your current using token
This is demo, current you use "Get New Access Token" I am using Keycloak v.18, getting token as admin
New method using variable
You can make own POST call for getting
access-tokenand then assign same name variable. Before your API call, you needs this code inTestssection.POST call, your token URL and key/value for your inputs.
If you success, will get response in body
How to use it in other API call.
In the
Authorizationtab, selectBearer TokenTypeAnd Add this code. it is access token.
Then you can call any API like this. Will get the result