Token used too early

968 views
Skip to first unread message

Sean McMahon

unread,
Mar 16, 2022, 8:29:15 AM3/16/22
to GAM for Google Workspace
Hi,

I've seen multiple mentioned of this system clock problem, but still don't know how to resolve this.  I was gettting error this on an older version so I'm trying to upgrade to the latest and getting the same token used to early error even during my upgrade.

On Windows 10, I'm doing the step "Update GAMADV-XTD3 client access." and I got this error below.

Enter verification code: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Traceback (most recent call last):
  File "__init__.py", line 54774, in ProcessGAMCommand
  File "__init__.py", line 53903, in processOauthCommands
  File "__init__.py", line 8628, in doOAuthUpdate
  File "__init__.py", line 8464, in doOAuthRequest
  File "__init__.py", line 3783, in writeClientCredentials
  File "__init__.py", line 3763, in _getValueFromOAuth
  File "google\oauth2\id_token.py", line 146, in verify_oauth2_token
  File "google\oauth2\id_token.py", line 126, in verify_token
  File "google\auth\jwt.py", line 278, in decode
  File "google\auth\jwt.py", line 198, in _verify_iat_and_exp
ValueError: Token used too early, 1647432576 < 1647432590

I gather that my time is different from Google's time.  How do I convert the long numbers above (econds?  minutes?) to the number of seconds I am off, and in which direction?

I use GAMadv every day.  But a novice at all this api stuff.  Any help would be GREATLY appreciated.

Thanks!

Sean McMahon

Ross Scroggs

unread,
Mar 16, 2022, 10:36:51 AM3/16/22
to google-ap...@googlegroups.com
Sean,

What is: gam version

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/29a4fb3d-021f-48cd-9862-a76f8a0f942dn%40googlegroups.com.

Sean McMahon

unread,
Mar 24, 2022, 1:43:15 PM3/24/22
to GAM for Google Workspace
Hi Ross.  

Version: 6.03.25.

I'm dead in the water.  Can't use regular gam or gamadv that I relay on every day.  Even on another machine which is a back up for me to run regular gam, I am consistently getting errors like this:

ERROR: Token used too early, 1648142255 < 1648142319

We use a network time server here in our AD domain.

Is Google insisting on the time being within a really short time of their time?

Thanks,
Sean McMahon

Sean McMahon

unread,
Mar 24, 2022, 1:56:11 PM3/24/22
to GAM for Google Workspace
Update, I am not dead in the water anymore.  I manually set my time in the (win10) control panel > "Set the time and date" applet. going ahead two minutes fixed it.  This got me around any group policy locking down my system's time.

Any insight would be appreciated.  -But alas it is not urgent any more.

Thank you.

Ross Scroggs

unread,
Mar 24, 2022, 1:58:41 PM3/24/22
to google-ap...@googlegroups.com
Sean,

The current version is 6.17.02 and this issue was addressed long ago; update.

After installing the new version do:
gam update project
gam oauth create
gam user us...@domain.com check serviceaccount.

Send me a Meet/Zoom invitation if you need help doing the upgrade.

Ross

Bao Huynh

unread,
Aug 22, 2025, 2:52:15 PMAug 22
to google-ap...@googlegroups.com
Hi,

Bring this back up as I just encountered this problem and I am on version 7.14 then I updated to version 7.19 and the problem is still there.

The error:

ERROR: Please correct your system time.

ERROR: Token used too early, 1755888459 < 1755888476. Check that your computer's clock is set correctly.

My system clock is correct. Anyone know how to fix this?

Thanks,



--

Bao Huynh

Director of Information Technology

Los Altos School District

650-947-1175

Jay Lee

unread,
Aug 22, 2025, 3:08:55 PMAug 22
to google-ap...@googlegroups.com
Show the output of:

gam version extended

Jay Lee


Bao Huynh

unread,
Aug 22, 2025, 5:23:54 PMAug 22
to google-ap...@googlegroups.com
Ross was able to help me with this.

The device was off by 16 seconds with Google.

So we run this:

gam config clock_skew_in_seconds 20 SAVE

Thanks,

Jay Lee

unread,
Aug 22, 2025, 5:38:44 PMAug 22
to google-ap...@googlegroups.com
15 seconds is a significant amount of time for an Internet connected device to be out of sync. 

I'd recommend attacking the core issue and ensuring your device has the correct time and is syncing time regularly. Otherwise this issue is likely to crop up in other areas for you. You'd be amazed to know how important time sync is to the modern Internet.

Jay Lee

Bao Huynh

unread,
Aug 22, 2025, 6:20:40 PMAug 22
to google-ap...@googlegroups.com
Thanks Jays! I am looking into why the time is off on my server.

Thanks,

Reply all
Reply to author
Forward
0 new messages