Reputation: 919
We have had a GA Reporting API integration working smoothly since last year with no changes. Recently, to be more precise, starting from the 31st of July, the authentication stopped working. We are now getting { error: 'invalid_grant' }
. We are using a service account as explained here, https://developers.google.com/console/help/new/#serviceaccounts, and it's a Node.js script, using .p12 keys, similarly to what is outlined here, http://dannysu.com/2014/01/16/google-api-service-account/.
We did try recreating a service account, making sure we go through all the steps, enabling all the API's that need to be enabled. We even tried making the service account users owners, but still no luck.
Are you aware of anything that might have changed recently with regards to the service accounts authentication process? Or has any of you experienced similar issues?
Cheers,
Iraklis
Upvotes: 3
Views: 71
Reputation: 101
I was able to solve this issue by running the command sudo ntpdate ntp.ubuntu.com
on the server hosting integration scripts. This synchronizes the time with the ntp servers.
The time was off by only a few minutes, and it seems to make a lot of difference.
Upvotes: 3