Intermittent 403 Access Not Configured

主宰稳场 提交于 2019-12-10 18:37:24

问题


I am intermittently receiving the following error on two different API Projects. The API Projects have been functioning normally for nearly a year without change. When the error starts occurring it happens in bursts lasting several minutes, then starts functioning properly again. The error events happen several times an hour, we noticed the errors happening early last night more than 12+ hours ago. Any help is appreciated.

API Scopes: www.googleapis.com/auth/userinfo.profile www.googleapis.com/auth/userinfo.email

Error calling GET https://www.googleapis.com/oauth2/v2/userinfo?key=*******: (403) Access Not Configured. Please use Google Developers Console to activate the API for your project.


回答1:


I had this problem this morning. Instead of using

https://www.googleapis.com/oauth2/v2/userinfo?key=**

You now need to use

https://www.googleapis.com/plus/v1/people/me?access_token=**

and enable the Google+ API in the admin console. There might be another way to do this without Google+, but this worked for me!

No idea why this changed - it seemed like the userinfo method was scheduled for deprecation but in a couple months. You might be able to get some info from Google about the user without Google+, just check the docs.



来源:https://stackoverflow.com/questions/22640094/intermittent-403-access-not-configured

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