googleads/google-ads-python

Warning: Scope has changed from "https://www.googleapis.com/auth/adwords" to "https://www.googleapis.com/auth/userinfo.profile openid https://www.googleapis.com/auth/adwords https://www.googleapis.com/auth/userinfo.email".

investeusa opened this issue · 0 comments

Describe the bug:
Warning: Scope has changed from "https://www.googleapis.com/auth/adwords" to "https://www.googleapis.com/auth/userinfo.profile openid https://www.googleapis.com/auth/adwords https://www.googleapis.com/auth/userinfo.email".

Steps to Reproduce:

  1. Follow the documentation: https://developers.google.com/google-ads/api/docs/get-started/make-first-call?hl=pt-br
  2. oauth2l fetch --credentials credentials.json --scope adwords \ --output_format refresh_token
  3. No refresh_token is generated. python3 generate_user_credentials.py -c credentials.json

Expected behavior:
output the refresh_token.

Client library version and API version:
Client library version:
google-api-core==2.19.0
google-auth==2.29.0
google-auth-oauthlib==1.2.0
googleapis-common-protos==1.63.0
Google Ads API version: google-ads==24.0.0

attrs==23.2.0
blinker==1.8.2
cachetools==5.3.3
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
exceptiongroup==1.2.1
Flask==3.0.3
google-ads==24.0.0
google-api-core==2.19.0
google-auth==2.29.0
google-auth-oauthlib==1.2.0
googleapis-common-protos==1.63.0
grpcio==1.63.0
grpcio-status==1.62.2
h11==0.14.0
idna==3.7
importlib_metadata==7.1.0
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==2.1.5
oauthlib==3.2.2
outcome==1.3.0.post0
proto-plus==1.23.0
protobuf==4.25.3
pyasn1==0.6.0
pyasn1_modules==0.4.0
PySocks==1.7.1
PyYAML==6.0.1
requests==2.31.0
requests-oauthlib==2.0.0
rsa==4.9
selenium==4.20.0
sniffio==1.3.1
sortedcontainers==2.4.0
trio==0.25.0
trio-websocket==0.11.1
typing_extensions==4.11.0
urllib3==1.26.15
Werkzeug==3.0.3
wsproto==1.2.0
zipp==3.18.1

Request/Response Logs:
Traceback (most recent call last):
File "path/generate_user_credentials.py", line 213, in
main(args.client_secrets_path, configured_scopes)
File "path/generate_user_credentials.py", line 92, in main
flow.fetch_token(code=code)
File "path/folder/lib/python3.9/site-packages/google_auth_oauthlib/flow.py", line 285, in fetch_token
return self.oauth2session.fetch_token(self.client_config["token_uri"], **kwargs)
File "path/folder/lib/python3.9/site-packages/requests_oauthlib/oauth2_session.py", line 406, in fetch_token
self._client.parse_request_body_response(r.text, scope=self.scope)
File "path/folder/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 427, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File "path/folder/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in parse_token_response
validate_token_parameters(params)
File "path/folder/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 471, in validate_token_parameters
raise w
Warning: Scope has changed from "https://www.googleapis.com/auth/adwords" to "openid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/adwords https://www.googleapis.com/auth/userinfo.profile".

Anything else we should know about your project / environment: