[Google Ads Api] Refresh token returns not found

233 views
Skip to first unread message

Varun Rau

unread,
Feb 24, 2021, 12:10:15 AM2/24/21
to AdWords API and Google Ads API Forum
Hi,

My goal is to develop against the conversion upload service in Node. Since there is no node client library, I'm using the REST apis.

I'm currently stuck trying to get a valid access token from my refresh token. I created a new OAuth 2.0 client id for my project where I have the client id and secret. I then generated a refresh token by running the generate_refresh_token.py script (https://raw.githubusercontent.com/googleads/googleads-python-lib/master/examples/ad_manager/authentication/generate_refresh_token.py) replacing the scope with https://www.googleapis.com/auth/adwords. From there I tried creating an access token like the documentation does here (https://developers.google.com/google-ads/api/docs/rest/auth), but I continually get a "Not Found" error instead.

What am I doing wrong?

Thanks any help would be greatly appreciated!

Google Ads API Forum Advisor Prod

unread,
Feb 24, 2021, 10:21:40 AM2/24/21
to varu...@gmail.com, adwor...@googlegroups.com
Hi Varun,

Thanks for reaching out. Can you please try obtaining the refresh token using the OAuth Playground? Please let us know if you have any issues creating the refresh token using this process.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2DITcQ:ref

Varun Rau

unread,
Feb 24, 2021, 12:39:19 PM2/24/21
to AdWords API and Google Ads API Forum
Hi Matt!

Thanks for the quick response! I was able to get a refresh token using the OAuth playground. Unfortunately, I still receive the same Not Found error.  This is the request I'm making:

$ curl \
  --data "grant_type=refresh_token" \
  --data "client_id=MYID.apps.googleusercontent.com" \
  --data "client_secret=MYSECRET" \
  --data "refresh_token=REFRESH_TOKEN" \
Not Found%

Google Ads API Forum Advisor Prod

unread,
Feb 24, 2021, 2:36:20 PM2/24/21
to varu...@gmail.com, adwor...@googlegroups.com
Hi Varun,

Can you confirm if you have created the client ID for a web application? This is the only type of application that will work for the OAuth playground. 

If so, can you please reply privately and provide the exact curl request that you are making?

Thanks,

Varun Rau

unread,
Feb 24, 2021, 3:01:18 PM2/24/21
to AdWords API and Google Ads API Forum
Thanks responded in a private message. :)
Reply all
Reply to author
Forward
0 new messages