间歇性403访问未配置

编程入门 行业动态 更新时间:2024-10-24 08:26:43
本文介绍了间歇性403访问未配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在两个不同的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访问未配置

本文发布于:2023-11-16 15:57:58,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:间歇性

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!