gapiで「Fatal error: Uncaught exception ‘Exception’ with message ‘GAPI: Failed to authenticate user. Error: “Error=BadAuthentication」エラーが出た際の対処法
【注意】2015年6月から発生した「GAPI: Failed to authenticate user.」というエラーについての解決方法は、こちらの記事を御覧ください。
gapiを利用しているWebサーバーを先日移転したのですが、移転後にページアクセスすると次のように認証エラーが発生していました。
Fatal error: Uncaught exception 'Exception' with message 'GAPI: Failed to authenticate user. Error: "Error=BadAuthentication...
どうやら、Google APIを利用するアカウントでGoogle側にログインし、Developer Consoleというページで利用するAPIごとにON・OFFを設定しないといけないようになってました。
このように「Analytics API」の箇所を「OFF」から「ON」にします。
アプリケーションからのアカウントを許可
最後に https://accounts.google.com/DisplayUnlockCaptcha にアクセスしてアクセスを許可します。
参考URL:http://goo.gl/1nTVpI
2014-02-14