Search code examples
google-api-nodejs-clientgoogle-people-api

Google People API connections list returns empty response


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?


Solution

  • 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.