def get_token(request):
flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
'C:\\client_secret.json',
scopes=[oauth2.GetAPIScope('adwords')]
)
flow.redirect_uri = 'https://achedescontos.online/oauth2callback'
authorization_url, state = flow.authorization_url(
access_type='offline',
include_granted_scopes='true'
)
context = {
'authorization_url': authorization_url
}
return render(request, 'index.html', context)
def oauth2callback(request):
context = {
'request': request,
'requestget': request.GET,
'code': request.GET['code']
}
return render(request, 'oauth.html', context )
flow.fetch_token(code=auth_code)
credentials = flow.credentials
Hello,
Thank you for reaching out to support. Since the issue is specific to the Python client library, you could refer to this related issue on the Github. If you're still having an issue, you could post your concerns on the Github Python issue tracker and the library owners will be able to assist you on this.
Regards,
Bharani, Google Ads API Team