Home > OS >  Android reading emails without enabling less secure app
Android reading emails without enabling less secure app

Time:04-07

So i came across this enter image description here

I was wondering if there will be any alternative? I need to be able to read emails and download attachments through my application without the user having to do so himself, So the Gmail API is no good as far as i could see.

I also couldn't find any other option to access a gmail inbox without enabling this option... Ty for your time.

CodePudding user response:

The whole point of this is that you should not be using someone's login and password to access gmail. You could try using an apps password but it is unlcear if this will work or not in the long run. Google has been very vague about that.

You should be authorizing the user either using Xoauth2 for the smtp server or by using the Gmail api and authorizing the user.

With oauth you can request a refresh token and then you will only need to request the users permission once after that you can use your refresh token to request a new access token.

  • Related