2

I'm using the Service Account to access the Google Analytics API in Java code. It works perfectly well on my local machine. But does not work on Deployment Server.

Error is:

com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
{
  "error": "invalid_grant",
  "error_description": "Invalid JWT: Token must be a short-lived token and in a reasonable timeframe"
}

Only solution that I saw after searching many forums is to Synchronize System Clock.

But unfortunately I cannot do this as my server is hosted by third party and it is a shared server so I do not have access to System Clock.

I'm looking for solutions where setting/modifying TimeZone can resolve this. Has anyone tried this before?

1
  • Please, consider going back to this question and giving a feedback to people. Be a nice user and mark the accepted answer, if that's the case. Otherwise, people won't be motivated to help you again (in my opinion). Commented Jul 25, 2017 at 13:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.