更新时间:2023-12-01 12:45:40
我使用:
spreadsheetService = new SpreadsheetService("cellmaster.com.au-v0.2");
spreadsheetService.setHeader("Authorization", "Bearer " + accessToken);
而不是:
spreadsheetService = new SpreadsheetService("cellmaster.com.au-v0.2");
spreadsheetService.setOAuth2Credentials(credential);
我还必须为刷新令牌添加代码。随着访问令牌即将到期。但刷新令牌可以正常运行。
also I had to add code for the refresh token. As the access token soon expires. But the refresh token works as you would expect.