After authenticating with Google using GoogleSignIn, one of the next steps I wanted to tackle in my app was retrieving a list of messages. Here is the reference on this part of the API. What we see is that it requires a userId (which is your email address… or alternatively just the value “me”).
It has some optional query parameters such as indicating if you want to also include trash and spam folders, as well as filtering on labels. You can also pass in a query string in exactly the same format as you would the Google Search Box on email. Such as “from:em[email protected]”, or just by keyword or phrase, etc…
On the right of the page there is also a way to test this out. In userId put in your email address and in labelIds, put in the word INBOX in CAPS.
[Read more…]