apipostman

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


Solution

  • 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