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, , and it's a Node.js script using .p12 keys, similar to what is described here, http: // .

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?



source to share

1 answer

I managed to solve this problem by running the command sudo ntpdate

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.



All Articles