SteveWinward / GoogleSheetsWrapper

Google Sheets API .NET Wrapper Library
MIT License
48 stars 13 forks source link

Failure to authentificate #42

Closed Withaust closed 3 months ago

Withaust commented 3 months ago

I was using this piece of code for ~4 months without issues:

var jsonCredsContent = File.ReadAllText("info.json");
sheetHelper = new SheetHelper(SheetId, "XXXXXX@XXXXXXXX.iam.gserviceaccount.com", "");
sheetHelper.Init(jsonCredsContent);

but now it seems to produce an exception at the Init part:

Google.Apis.Auth.OAuth2.Responses.TokenResponseException: 'Error:"invalid_grant", 
Description:"Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. 
Check your iat and exp values in the JWT claim.", Uri:""'
Withaust commented 3 months ago

Nevermind, this was caused by PC not having up-to-date time setup in according to NTP.

SteveWinward commented 3 months ago

@Withaust glad you got it resolved!