Token generated just before is invalid

To which endpoint are you attempting to call? Show your call please.

The error would suggest you specified the wrong clientID or something else is invalid in your call