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?