how can i get refresh token

10 views
Skip to first unread message

곽동호

unread,
Jul 2, 2024, 12:55:46 PM (12 hours ago) Jul 2
to Google Ads API and AdWords API Forum
when i follow 
https://developers.google.com/google-ads/api/docs/get-started/make-first-call?hl=ko#fetch_a_refresh_token this steps, The only thing that i get is code value in a url (i think it is not refresh token but a auth code) ex)http://localhost:8080/?code=4/0ATx3LY4JU8NTgDK0AcjcOBYaamuDFzeBuXIXi7xjFsuwrpbf7WZUp-yvE7XPkYVNptWKiA&scope=https://www.googleapis.com/auth/adwords but the documents say that i can get json type output like this {
 
"client_id": "******.apps.googleusercontent.com",
 
"client_secret": "******",
 
"token_uri": "https://oauth2.googleapis.com/token",
 
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
 
"refresh_token": "******",
 
"type": "authorized_user"
}
how can i get a refresh_token?

Google Ads API Forum Advisor

unread,
Jul 2, 2024, 5:00:13 PM (8 hours ago) Jul 2
to rhkr...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads API support team.

To get the refresh token, you have to follow the below steps.

  1. First, you have to run the oauth2l tool to generate the refresh token.
  2. Now the command "oauth2l" will open a Google account sign-in window where you can find authentication steps.
  3. After verifying the scope, click the continue button to grant permission.
  4. Now you can find the output in JSON format.
          {

                  "client_id": "******.apps.googleusercontent.com",

                  "client_secret": "******",

                   "token_uri": "https://oauth2.googleapis.com/token",

                   "auth_uri": "https://accounts.google.com/o/oauth2/auth",

                   "refresh_token": "******",

                  "type": "authorized_user"

           }

In the above response, you can find a refresh token.

I would recommend you please refer to the get the refresh token one more time, follow all the steps thoroughly, and try again. 

This message is in relation to case "ref:!00D1U01174p.!5004Q02tJXlc:ref" (ADR-00244919)

Thanks,

 
Google Logo Google Ads API Team

Register for the upcoming workshop: Performance Max and the Google Ads API!
 


Reply all
Reply to author
Forward
0 new messages