403 error when calling Google People API

可紊 提交于 2019-12-11 06:28:36

问题


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:


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



来源:https://stackoverflow.com/questions/38022171/403-error-when-calling-google-people-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!