3

I am trying to fetch the list of a person's contacts using Google People Api. It works well on the "try this interface" on the google developer console.

But while trying to fetch responses using googleapis

or

HTTP Call to

https://people.googleapis.com/v1/people/me/connections?access_token=accessToken&personFields=emailAddresses&requestSyncToken=true

Returns:

{ "nextSyncToken": "^MisAxiFjnAAAABII_rKSh_Wz1gIQ_rKSh_Wz1gIux9KTpVj73mi1BREyou28OiQ0MTJmYmEyZi01ODJiLTQ1YzItODdmYi0xZjkxMDNkYTIxMDk" }

All the accesses and permissions seem alright. I am expecting a list of contacts but get only this one field. What am i missing here?

Baljeet
  • 41
  • 9

1 Answers1

1

Found the problem and solution myself. This problem was being faced only with Gsuite accounts. We have to enable api access from admin panel of GSuite account to make it work. In case you do not want to do that, use Google Contacts Api.

Google contacts api works perfectly but it still works on gdata protocol.

Baljeet
  • 41
  • 9
  • Could you add some more context? I believe I'm seeing the same issue, but I believe API access is turned on for our GSuite Domain. Is there a specific screen I need to go to or setting switch I need to flip? – Michael Wasser Jun 21 '18 at 21:42
  • @MichaelWasser Did you ever figure this out? I'm having the same issue and I don't know where to go in the G Suite admin panel to enable the People API. – Andrew Page Dec 21 '18 at 00:24
  • @AndrewPage Unfortunately, I don't remember where I landed on this specifically, but I do remember being disappointed by the level of access I could get. As I recall, I eventually gave up trying to get the people API to work (or found out it doesn't work?) in favor of the contacts API (https://developers.google.com/contacts/v3/) – Michael Wasser Dec 21 '18 at 06:13