Can't generate a refresh token

86 views
Skip to first unread message

Philipp Sowinski

unread,
Aug 26, 2021, 4:27:53 AM8/26/21
to AdWords API and Google Ads API Forum
Hi,

I'm currently following this guide to set up Google Ads API for my project:
https://developers.google.com/google-ads/api/docs/first-call/overview#config
(I want to upload offline conversions programmatically through the api)

1) I successfully requested a developer token
2) I created a OAuth2 client ID and client secret
3) I struggle to generate the OAuth2 refresh token

If I run the script mentioned in the docs and open the URL, then I get this error:
python3 authenticate_in_web_application.py --client_secrets_path client_secret.json 

Paste this URL into your browser: 

Waiting for authorization and callback to: http://localhost:8080...
Traceback (most recent call last):
  File "authenticate_in_web_application.py", line 203, in <module>
    main(args.client_secrets_path, configured_scopes)
  File "authenticate_in_web_application.py", line 81, in main
    code = _get_authorization_code(passthrough_val)
  File "authenticate_in_web_application.py", line 112, in _get_authorization_code
    params = _parse_raw_query_params(data)
  File "authenticate_in_web_application.py", line 160, in _parse_raw_query_params
    params = match.group(1)
AttributeError: 'NoneType' object has no attribute 'group'

What I am missing?

Philipp Sowinski

unread,
Aug 27, 2021, 2:50:49 AM8/27/21
to AdWords API and Google Ads API Forum
On a computer with a fresh installed ubuntu operating system it works. I think there is a problem with package versions.

Would be nice to know which package version is wrong but I guess this is out of scope.

Google Ads API Forum Advisor

unread,
Aug 31, 2021, 3:10:19 PM8/31/21
to philipp....@gmail.com, adwor...@googlegroups.com
Hi,

Glad to know that the issue was resolved. Please post your concern in GitHub issue tracker: https://github.com/googleads/googleads-python-lib/issues/123

Thanks,

Google Logo
Lakshmi Prathipati
Google Ads API Team
 


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