GAPI:无法验证用户。永久修复PHP [英] GAPI: Failed to authenticate user. Permanent fix PHP

查看:246
本文介绍了GAPI:无法验证用户。永久修复PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试从GAPI中获取内容,但有时会引发此错误:


异常GAPI:失败验证用户。错误:
https://developers.google.com/accounts/docs/AuthForInstalledApps


我浏览了所有答案,但找不到解决方案。
我以前试过使用这两个链接:

https://accounts.google.com/DisplayUnlockCaptcha



https://www.google.com/settings/security/lesssecureapps



它曾经工作但不再是,有人可以帮忙吗?

解决方案


验证用户失败
blockquote>

意味着您的身份验证有问题。



GAPI 自2009年以来一直未有效。它似乎也使用客户端登录,该登录已在 2015年4月20日。您不能再使用Google Analytics API进行客户端登录,您需要切换到Oauth2或服务帐户。所以无论是该项目的作者需要修复他的代码,它似乎是一个开源项目,所以你可以为他修复它。



在我看来 Google PHP客户端库可能是更好的解决方案。



教程


  1. 我的教程谷歌分析API php Oauth2 我的教程 Google AnalyticsAPI php服务账户 google.com/analytics/devguides/reporting/embed/v1/rel =nofollow> embedded api


I am trying to fetch content from the GAPI it works sometimes but the other times it throws this error:

Exception GAPI: Failed to authenticate user. Error: "https://developers.google.com/accounts/docs/AuthForInstalledApps "

I browsed through all the answers but couldn't find a solution. I tried using both of these links previously:

https://accounts.google.com/DisplayUnlockCaptcha

https://www.google.com/settings/security/lesssecureapps

It used to work but not anymore, can someone help?

解决方案

Failed to authenticate user

Means there is something wrong with your authentication.

GAPI hasn't been worked on since 2009. It also appears to use client login which was discontinued / shutdown on April 20 2015. You can no longer use client login with Google Analytics API, you need to switch to Oauth2 or a service account. So either the author of that project needs to fix his code, it appears to be an open source project so you could probably fix it for him.

In my opinion Google PHP client library probably a better solution.

tutorials:

  1. My Tutorial Google Analytics API php Oauth2
  2. My Tutorial Google Analytics api php service account
  3. Googles Tutorial embedded api

这篇关于GAPI:无法验证用户。永久修复PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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