Google Analytics API oauth exception “invalid_grant” with Service Account. Same code on two servers. Only one works
问题 I'm querying the Analytics API via a Service Account . I have written the code on the dev server and it works without issues. When running the same code on the production server, it throws this: Google_AuthException: Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant" }' I've tried creating another Service account, and the behavior is the same. The oAuth IETF draft (http://tools.ietf.org/html/draft-ietf-oauth-v2-31) says this about the error: invalid_grant The provided