Hi,
Please note, I previously had an issue getting the refresh token, which I
posted about here:
https://groups.google.com/g/adwords-api/c/8tW1GPj_u6E?hl=en
This thread is about a different issue, with a different error.
I've been getting refresh tokens successfully but today I'm getting a
"*Malformed
auth code*" error.
Visiting the request URL works fine as evidenced by the output in the
browser:
*Authorization code was successfully retrieved.**Please check the console
output.*
But, instead of displaying the token, the terminal shows the following
error:
*Traceback (most recent call last): File
"/home/.../authenticate_in_web_application.py", line 206, in <module>
main(args.client_secrets_path, configured_scopes) File
"/home/.../authenticate_in_web_application.py", line 84, in main
flow.fetch_token(code=code) File
"/home/.../.local/lib/python3.9/site-packages/google_auth_oauthlib/flow.py",
line 286, in fetch_token return
self.oauth2session.fetch_token(self.client_config["token_uri"], **kwargs)
File
"/home/.../.local/lib/python3.9/site-packages/requests_oauthlib/oauth2_session.py",
line 366, in fetch_token
self._client.parse_request_body_response(r.text, scope=self.scope) File
"/home/.../anaconda3/envs/backstop/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/clients/base.py",
line 448, in parse_request_body_response self.token =
parse_token_response(body, scope=scope) File
"/home/.../anaconda3/envs/backstop/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/parameters.py",
line 441, in parse_token_response validate_token_parameters(params)
File
"/home/.../anaconda3/envs/backstop/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/parameters.py",
line 448, in validate_token_parameters
raise_from_error(params.get('error'), params) File
"/home/.../anaconda3/envs/backstop/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/errors.py",
line 399, in raise_from_error raise
cls(**kwargs)oauthlib.oauth2.rfc6749.errors.InvalidGrantError:
(invalid_grant) Malformed auth code.*
Has anyone else encountered this? Thanks in advance for looking! :)
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"Google Ads API and AdWords 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/70fe79da-c978-48af-a677-4e8671386761n%40googlegroups.com.