Is the end result you are trying to achieve automatically obtaining an OAuth2.0 bearer token? Or are you specifically wanting to do all the steps you have defined?
my preferred end result is to have the bearer token. the step that i marked in bold is the step i am missingā¦
i am fine with a solution that will hold the entire OAuth process.
If thatās what your asking?
Iād put that in whatever API your trying to set up and see if that gives you anything?
I use it for OAuth 2.0 in the OAuth tab so I donāt know about doing the flow in separate requests.
Another thing is OAuth2.0 without an application/server process means you HAVE to sign in on their redirect, if they donāt show an option for it, you wonāt be able to do so.
For example, Imgurās API does OAuth2.0 but does not allow an option to do so without user sign-in on their portal. Therefore youād have to use the Postman OAuth2.0 tab as our preview window is also not a browser so you wouldnāt even be able to do it manually.
I assume youāre using the Authorization Code strategy for authorization. To solve the redirection problem that you mentioned in the 5th step. You can go to your postman settings and disable Automatically follow redirects then you can get the redirection URL with its code from the response headers. It should be in the Locations field in the headers.
In my understanding, after I sign in in the preview window the first time, Postman already have the cookies and refresh_token so I donāt have to sign in a second time when clicking Get New Access Token. So can I somehow trigger to it and get a new acess_token in the pre-request script?