Authentication problem

214 views
Skip to first unread message

sshaw....@gmail.com

unread,
Aug 27, 2018, 8:54:08 PM8/27/18
to AdWords API and Google Ads API Forum
I'm trying to get started with adwords api but am unable to authenticate.

I am using python.  When I run:

flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
    'client_secret.json', scope=[oauth2.GetAPIScope('adwords')])

I get an error

TypeErrorTraceback (most recent call last)
<ipython-input-56-a189d83c6118> in <module>()
      1 flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
----> 2     'client_secret.json', scope=[oauth2.GetAPIScope('adwords')])
      3 flow.redirect_uri = 'https://www.example.com/oauth2callback'

TypeError: from_client_secrets_file() takes exactly 3 arguments (2 given)


I read that sometimes if you download sqlparse it fixes this but I tried that and it didn't work.  My googleads.yaml file is stored on my home directory and I have my client_id, client_secret, and refresh_token filled out.

Any idea what is wrong? 

Thanks.

Luis Xander Talag (AdWords API Team)

unread,
Aug 28, 2018, 6:38:14 AM8/28/18
to AdWords API and Google Ads API Forum
Hi,

When setting up your OAuth2 credentials, we recommend the installed application flow app type for this. I would suggest to follow the guides on the links that I provided. Then, once done with the setup, you may try some basic operations here and let me know if it works.

Thanks and regards,
Luis
AdWords API Team

honn...@gmail.com

unread,
Oct 22, 2018, 5:37:08 AM10/22/18
to AdWords API and Google Ads API Forum
Hi,

> flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
>      'client_secret.json', scope=[oauth2.GetAPIScope('adwords')])

I got the exactly same error.
scope=    must be    scopes=. s is required.

Jun



2018年8月28日火曜日 5時54分08秒 UTC+9 sshaw....@gmail.com:
Reply all
Reply to author
Forward
0 new messages