From 8f22d54f106a1da3178533797d641e7c50243014 Mon Sep 17 00:00:00 2001 From: Sankalp Date: Sat, 31 Oct 2015 02:13:06 +0530 Subject: [PATCH] Added Frequent issues and fixes There had been many "issues" reported because trivial setup mistakes or other config problems, so I though it would be a good idea to have them documented here. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 8cac0bf..6131910 100644 --- a/README.md +++ b/README.md @@ -69,3 +69,9 @@ GAPI (because now Google Analytics API only supports OAuth2) will require you to 3. Download the .p12 file for this service account, upload to the same folder as **gapi.class.php** 4. Enable 'analytics API' in the [Google Developers console]((https://console.developers.google.com/project)) 5. In Google Analytics *Administration > User Management*, give the service account 'Read and Analyse' permissions on the analytics accounts you want to access + +## Frequent issues and how to fix them + * Error: `{ "error": "invalid_grant", "error_description": "Bad Request" }` on a previously working setup. Fix: Check your server time, and bring it in sync with the network time. + * Error: Just not working the first time. E.g., https://github.com/erebusnz/gapi-google-analytics-php-interface/issues/135. Fix: Refer to the setup instructions above, and make sure you followed all. + * Error: Older credentials not working. Fix: If you're still using username, password combination, it won't work anymore, since the Google Analytics API moved to proper OAuth quite some time ago. +