May i know outline or any examples about pre-request script to capture access token or bearer token when we have below information for “Authorization Code” grant type.
BaseURL
ClientId
ClientSecret
AuthURL
AccessTokenURL
redirect URL
Scope
Currently i am able to capture access token using - “Get New Access Token” button which will launch auth URL into browser and after providing username and password information and it will redirect to postman application with access token and which can be used by clicking on “Use token” button.
I want to automate this manual work through automation using script written at “Pre-request Script” editor.
Previously I have already achieved pre-request script to get access token for grant type = client_credentials for one of project requirements, but now would need help or idea to automate capturing access token for grant type = authorization_code.
Can any one please guide me on the same.