Sifat Amin
Sifat Amin

Reputation: 1186

How to get google Authorization Code using POSTMAN

I want to get the Authorization code to generate ACCESS TOKEN and REFRESH TOKEN for my Application. I'm trying to get the job done using POSTMAN. But this seems not working. I'm attaching a screenshot of POSTMAN. Can you tell me what I am doing wrong? Any useful suggestion or alternative solution is appreciated.

enter image description here

Upvotes: 0

Views: 3771

Answers (3)

Sifat Amin
Sifat Amin

Reputation: 1186

After many tries, I figured it out myself. To Generate the Refresh token and access token the first time, I needed Authorization Code. I thought I need to generate it again and again but it Turns out I needed it only once and when I got the access_token and refresh_token, I can easily generate access_token by using refresh_token. Here's the corrected API request flow-

Requesting Authorization code

Using Web POSTMAN REQUESTION PREVIEW

Requesting ACCESS TOKEN and REFRESH TOKEN

POSTMAN ACCESS TOKEN AND REFRESH PREVIEW

Regenerating Access Token using refresh token

POSTMAN ACCESS TOKEN GENERATION PREVIEW

Upvotes: 0

Stroh
Stroh

Reputation: 45

It will be easier to do this using settings within the Postman GUI. There is an Authorization tab in which you can specify auth type, configure new tokens, add your client id & secret, etc.

Upvotes: 0

Related Questions