It is my credential function request
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)
It is the response function
def oauth2callback(request):
context = {
'request': request,
'requestget': request.GET,
'code': request.GET['code']
}
return render(request, 'oauth.html', context )
I am following these steps:
https://github.com/googleads/googleads-python-lib/wiki/API-access-on-behalf-of-your-clients-(web-flow)
But I have a question about the STEP 3
flow.fetch_token(code=auth_code)
credentials = flow.credentials
Where I put this code? I put it in the request function ou response
function?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/a1cad3bc-b9f7-4633-90b8-c99b25baea7d%40googlegroups.com.