You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an access token with scope https://www.googleapis.com/auth/gmail.modify and which I validated with SMTP to send emails. The same token used to try oauth2.py from this repository seems to be invalid:
python oauth2.py --test_imap_authentication --access_token=<access_token> --user=<email_address>
18:48.35 > b'ILPK1 AUTHENTICATE XOAUTH2'
18:48.50 < b'+ '
18:48.50 write literal size 364
18:49.49 < b'+ eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ=='
18:49.49 write literal size 364
18:49.64 < b'ILPK1 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)'
Traceback (most recent call last):
File "/Users/hurbina/src/gmail-oauth2-tools/python/oauth2.py", line 353, in<module>
main(sys.argv)
File "/Users/hurbina/src/gmail-oauth2-tools/python/oauth2.py", line 338, in main
TestImapAuthentication(
File "/Users/hurbina/src/gmail-oauth2-tools/python/oauth2.py", line 282, in TestImapAuthentication
imap_conn.authenticate('XOAUTH2', lambda x: auth_string)
File "/Users/hurbina/opt/anaconda3/lib/python3.9/imaplib.py", line 444, in authenticate
raise self.error(dat[-1].decode('utf-8', 'replace'))
imaplib.IMAP4.error: [AUTHENTICATIONFAILED] Invalid credentials (Failure)
I'd appreciate very much some help to understand what is wrong.
Hector.
The text was updated successfully, but these errors were encountered:
Hi!
I have an access token with scope
https://www.googleapis.com/auth/gmail.modify
and which I validated with SMTP to send emails. The same token used to tryoauth2.py
from this repository seems to be invalid:I'd appreciate very much some help to understand what is wrong.
Hector.
The text was updated successfully, but these errors were encountered: