1

I am trying to access sent mails with gmail on an android app. I tried to follow this but I don't understand how to get the Gmail API instance.

I also found two ways to connect: the gmail API one and Google Sign-In.

What's the difference between them and which one should I use ? Is this the way to access user's mails with my app ?

Diiscord
  • 101
  • 1
  • 7
  • 1
    If you want their emails, the gmail API. Google Sign-In is about using google for authentication. – Gabe Sechan Apr 13 '17 at 14:41
  • Thanks @GabeSechan ! What do I have to use then in order to get the mails ? I followed [this](https://developers.google.com/gmail/api/quickstart/android) to connect with the gmail API. – Diiscord Apr 13 '17 at 14:54

1 Answers1

0

What's the difference between them and which one should I use ? Is this the way to access user's mails with my app ?

Google Sign-in for Android is good for authentication purposes for your app. It does the heavy-lifting for you so you don't have to worry about authentication implementations.

However, if you intend to make calls to Gmail APIs like the Users.messages.list you've mentioned, Google Sign-in will not be enough. Components like authorization and scopes are added to the picture. So in your case, you need to start with the Gmail Android Quickstart as it details the steps you need to make successful calls.

ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56