googleads / googleads-python-lib

The Python client library for Google's Ads APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to generate the refresh token?

Sammion opened this issue · comments

commented

Hi team, how to generate the refresh token with the client id and client Secret?

@Sammion change this in file generate_refresh_token

flow = InstalledAppFlow.from_client_config(
    client_config.Build(), scopes=scopes)

for this:

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