我在两个不同的API项目上间歇性地收到以下错误。 API项目一直运行正常,近一年没有变化。当错误开始发生时,它会在持续几分钟的突发中发生,然后再次开始正常工作。错误事件每小时发生几次,我们注意到错误发生在昨晚12小时前。任何帮助表示赞赏。
API范围: www.googleapis/auth/userinfo.profile www.googleapis/auth/ userinfo.email
错误调用GET www.googleapis/oauth2/v2/userinfo?key= 的 * ** * ** * :(403)访问未配置。请使用Google开发者控制台为您的项目激活API。
解决方案今天早上我有这个问题。而不是使用
https: //www.googleapis/oauth2/v2/userinfo?key= *
您现在需要使用
https:// www.googleapis/plus/v1/people/me?access_token= * *
并启用Google+ API管理控制台。可能还有另一种方法可以在没有Google+的情况下做到这一点,但这对我有用!
不知道为什么会发生这种变化 - 它好像userinfo方法计划弃用,但在几个月。您可能可以从Google获取关于没有Google+的用户的一些信息,只需查看文档即可。
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/auth/userinfo.profile www.googleapis/auth/userinfo.email
Error calling GET www.googleapis/oauth2/v2/userinfo?key=*******: (403) Access Not Configured. Please use Google Developers Console to activate the API for your project.
解决方案I had this problem this morning. Instead of using
www.googleapis/oauth2/v2/userinfo?key=**
You now need to use
www.googleapis/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.
更多推荐
间歇性403访问未配置
发布评论