postalsys / imapflow

IMAP Client library for EmailEngine Email API (https://emailengine.app)
https://imapflow.com
Other
353 stars 59 forks source link

Scope https://www.googleapis.com/auth/gmail.readonly not working #157

Closed harbolaez closed 8 months ago

harbolaez commented 9 months ago

Describe the bug I'm getting the accessToken from RN with scope gmail.readonly, trying to logged in the user with the access token. But when I feed it to iampFlow I get

{
  response: '3 NO Lookup failed o132mb1614466vkc',
  responseStatus: 'NO',
  responseText: 'Lookup failed o132mb1614466vkc',
  authenticationFailed: true,
  oauthError: { status: 'invalid_request', scope: 'https://mail.google.com/' }
}

ny idea?

andris9 commented 8 months ago

ImapFlow only works with the https://mail.google.com/ scope. This means that your OAuth2 app must have been configured to support this scope in the Google Cloud Console. Also, when requesting the user to authenticate with OAuth2, that scope must be set in the requested scope listing.