间歇性403访问未配置 [英] Intermittent 403 Access Not Configured

查看:76
本文介绍了间歇性403访问未配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在两个不同的API项目上间歇性地收到以下错误。 API项目一直运行正常,近一年没有变化。当错误开始发生时,它会在持续几分钟的突发中发生,然后再次开始正常工作。错误事件每小时发生几次,我们注意到错误发生在昨晚12小时前。任何帮助表示赞赏。

API范围:
www.googleapis.com/auth/userinfo.profile
www.googleapis.com/auth/ userinfo.email



错误调用GET https://www.googleapis.com/oauth2/v2/userinfo?key= * ** * ** * :(403)访问未配置。请使用Google开发者控制台为您的项目激活API。

解决方案

今天早上我有这个问题。而不是使用

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



您现在需要使用



https:// www.googleapis.com/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.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.

解决方案

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.

这篇关于间歇性403访问未配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆