Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- auth_string = 'user=%s1auth=Bearer %s11' % (email, access_token)
- imap_conn = imaplib.IMAP4_SSL('imap-mail.outlook.com')
- imap_conn.debug = 4
- imap_conn.authenticate('XOAUTH2', lambda x: auth_string)
- imap_conn.select('INBOX')
- print(imap_conn.list())
- { 'access_token': '****',
- 'scope': 'User.Read Mail.Send Mail.ReadWrite',
- 'refresh_token': '***',
- 'token_type': 'Bearer',
- 'ext_expires_in': 0,
- 'expires_in': 3600
- }
- 46:15.27 > b'JEKB1 AUTHENTICATE XOAUTH2'
- 46:15.57 < b'+ '
- 46:15.57 write literal size 1584
- 46:21.21 < b'JEKB1 NO AUTHENTICATE failed.'
- 46:21.21 NO response: b'AUTHENTICATE failed.'
Add Comment
Please, Sign In to add comment