1
votes

So I am trying call the Google People API with the following from the JS API:

var request = gapi.client.people.people.get({
    'resourceName': 'people/me'
});

With the objective of retrieving the users email to ensure that a give user is using their corporate Google account and not say their personal account for a Google Drive integration with an application.

Its been about 26 hours now since the API was enabled on our application and we are still recieving this message back from the API:

Google People API has not been used in project --project name here-- before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/people.googleapis.com/overview?project=--project name here-- then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

This seems like this is taking an awful long time to propagate and the rest of the application works correctly. It also only seems to be this API that is the problem if I call say the Gmail API to get at the authorized users email that all works as expected. So I know the rest of the flow up to this point is working correctly.

The scopes being used in the application right now are the following:

var scope = ['https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/drive.file'];

So should it be taking this long or is there something I am missing here?

1
Try adding the access token to the request (header Authorization: Bearer your_auth_token)BNK
I'm using the JavaScript API. Before that line I do call the gettoken (exact name forthcoming) API method which the API should then be appending that token when the request is made. Again everything works if I use a different API like say the Gmail or Drive API. The People API is for whatever reason the problem.Dale
Did you solve it? I have the same problemchopeds

1 Answers

3
votes

Go and enable Google People API to https://console.developers.google.com/apis/api/people.googleapis.com/overview?project=xxxxxxxxx, where xxxxxxxxx is number of your app