GA Analytics Reporting API - Authentication Stopped Working

We had an integrated GA Reporting API integration from last year with no changes. Recently, to be more precise, since July 31st, authentication has stopped working. Now we get { error: 'invalid_grant' }

. We use a service account as described here, https://developers.google.com/console/help/new/#serviceaccounts , and it's a Node.js script using .p12 keys, similar to what is described here, http: //dannysu.com/2014/01/16/google-api-service-account/ .

We tried to recreate the service account, making sure we went through all the steps to enable any APIs that need to be enabled. We even tried to make the service user account owners, but still no luck.

Do you know anything that may have changed recently regarding the authentication process for service accounts? Or have any of you faced similar problems?

Cheers,
Iraklis

+3


source to share


1 answer


I managed to solve this problem by running the command sudo ntpdate ntp.ubuntu.com

on the server integration scripts. This will sync the time with the ntp servers.



The time was only off for a few minutes and it seems to make a big difference.

+3


source







All Articles