a-marenkov/gsheets

invalid_grant 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. Status code: 400

Opened this issue · 0 comments

I've switched to the version 0.5.0 and when I call the spreadsheet method I receive this error: invalid_grant 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. Status code: 400;

This is my code:

Future<Worksheet?> getWorksheet() async {
    final googleSheets = GSheets(Env.googleSheetReportsCredentials);
    final spreadSheet =
        await googleSheets.spreadsheet(Env.googleSpreadSheetIdReports);
    final worksheet = spreadSheet.sheets.firstWhere(
      (_) => _.spreadsheetId == Env.googleSpreadSheetIdReports,
    );
    return worksheet;
  }

PS. With the same logic and the version 0.4.2 I was able to save and fetch the Spreadsheet data.