3
votes

I'm referring to this URL https://cloud.google.com/speech/docs/getting-started to get started with the google speech API. As the site suggests,I followed the following steps

  • Create or select a project.
  • Enable the Cloud Speech API for that project
  • Create a service account
  • Download a private key as JSON

I have the gcloud installed on my command-line. Now when i try to activate service account using the below command,

gcloud auth activate-service-account --key-file=my-service-account-key-file

i'm getting the below error.

ERROR: (gcloud.auth.activate-service-account) There was a problem refreshing your current auth tokens: invalid_grant: Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and use a clock with skew to account for clock differences between systems.

I suspect it's the problem with the time zone. I'm running the command from my AWS EC2 instance.

1
I have the same problem, it only happens if I try to connect to Google Cloud when restarting the system before ntpd starts running. So it seems it is related with the local time of the server being too different from Google's servers.Daniel

1 Answers

0
votes

I think there is a cache with this somewhere, after around 10 minutes it resolved itself.

I ran into this error when I created a new key for a service account and deleted the old one.