user7403184
user7403184

Reputation:

Google People API request

Hi currently using people API by google, But i am having some errors on request "api.client.people.people.connections.list" on API.

The picture below will show the error, The first picture is the console error. and the other one is the code error it shows that the list is cannot read property of undefined. The code is in below.

enter image description here

    var request = gapi.client.people.people.connections.list({
    'resourceName': 'people/me',
    'requestMask.includeField': ['person.phoneNumbers', 'person.names','person.emailAddresses'],
    'sortOrder' : 'FIRST_NAME_ASCENDING',
    'pageSize': 500,
});

Upvotes: 1

Views: 5483

Answers (2)

Dean
Dean

Reputation: 321

This works today.

    gapi.client.people.people.connections.list({

The accepted answer was posted in 2017 so the API has probably changed somehow, but I copied the code for the above function and the call works for me. You can find the full source at: https://developers.google.com/people/quickstart/js

Upvotes: 1

Dylan
Dylan

Reputation: 1402

I ran into this too, their tutorial here has the same problem https://developers.google.com/people/quickstart/js.

Now you have to do gapi.client.people.people.me.connections.list

And list doesn't take a resourceName param anymore, you can see that here https://developers.google.com/people/api/rest/v1/people.connections/list.

It would be nice if they would update their tutorial...

Upvotes: 1

Related Questions