Search code examples
iosswiftprofilegmail-apiavatar

How get user avatar with gmail api in swift


I was reviewing this question, but for this I need to know the userid

I need to bring the avatar of users who have sent me an email, but they have only the name and email, nothing more.

For example:

GTLGmailMessagePartHeader 0x7fbb1e1560d0: {name:"From" value:"nameUser <emailuser@mail.com>"}

I came up with the idea of bringing the user information from email, but does not return the id.

getProfile

{
  "emailAddress": string,
  "messagesTotal": integer,
  "threadsTotal": integer,
  "historyId": unsigned long
}

Solution

  • With this option you don't need has apikey.

    http://picasaweb.google.com/data/entry/api/user/youridoryouremail?alt=json