venki
venki

Reputation: 413

How to retrieve profile photos from the Google Contacts API?

The Google Contacts API has a few endpoints useful for getting contacts:

otherContacts.list is the most useful: it includes automatically added contacts from various sources.

This is my current API call:

peopleService.otherContacts.list({
  readMask: 'metadata,names,emailAddresses,photos',
  pageToken: nextPageToken,
  sources: ['READ_SOURCE_TYPE_CONTACT', 'READ_SOURCE_TYPE_PROFILE']
})

I'm successfully able to get actual photos for all contacts within my company, eg: [email protected]

I do not receive photos from various other contacts outside of my company, eg: [email protected].

I only receive "default" photos. These are users I have had contact with via Gmail or Google Calendar - and I see their real photos correctly there. I also correctly see their photos in the Contacts GUI, at contacts.google.com

Questions:

  1. How do I access photos for all of my contacts, which Google seems to have but not provide in response to my API request?
  2. Is it just impossible/unsupported to access photos for all of my contacts? If so, could you point me to a source.

Upvotes: 0

Views: 126

Answers (0)

Related Questions