Refresh Token Issue -

282 views
Skip to first unread message

Sree Iyer

unread,
Jul 13, 2022, 6:52:27 PM7/13/22
to Google Ads API and AdWords API Forum
Hi All,

I'm using this API (Sample Code)
to upload Conversion Data to Google Ads

As per this Document -
1) I need to generate Client id and Client Secret.
     I'm not sure what should be the type "Web Application " or "Desktop" ?
     
  2)  Secondly I need to generate refresh token and for this I came across this Code base - 

 3) so here is what I did, I generated the Client Id and Client Secret with Type "Desktop App" and I used this Client Id and Client Secret to Generate the Refresh Token By executing this code - https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/authentication/generate_refresh_token.py

Log into the Google Account you use to access your AdWords account and go to the following URL:

It returns an URL and when I click on that URL, this is the error, I am getting

"""
Authorization Error
Error 400: invalid_request

You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure.

You can let the app developer know that this app doesn't comply with one or more Google validation rules
"""

Please see the attached screenshot.
Screen Shot 2022-07-13 at 3.50.43 PM.png

dimas ilham

unread,
Jul 15, 2022, 12:48:40 AM7/15/22
to Google Ads API and AdWords API Forum
Hi, trying to help out.

1. you can use a web application for example if you just use google ads for your website.

2. I'm seeing u using python, you can just watch this for example https://www.youtube.com/watch?v=9Kf7P3Qq5bY&t=189s

dimas ilham

unread,
Jul 15, 2022, 12:50:16 AM7/15/22
to Google Ads API and AdWords API Forum
add some words, google AdWords is deprecated you can't use it anymore, move to google ads documentation here https://developers.google.com/google-ads/api/docs/client-libs/python or Github on here https://github.com/googleads/google-ads-python/blob/main

Google Ads API Forum Advisor

unread,
Jul 15, 2022, 7:52:13 AM7/15/22
to dimasi...@gmail.com, adwor...@googlegroups.com
Hi All,

You have reached Google Ads API Forum.

Thank you for suggesting the possible solution to this concern, I can validate that the flow of the authentication is correct. In addition, it appears that the error occurred because you haven't followed the Oauth verification process. With this, I suggest that you follow the instruction below:

How to verify: OAuth API verification FAQs - Google Cloud Platform Console Help
General information: Unverified apps - Google Cloud Platform Console Help

Best regards,
Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cWMEi:ref
Reply all
Reply to author
Forward
0 new messages