【发布时间】:2013-05-15 13:49:42
【问题描述】:
我正在使用带有服务帐户的 Google Drive API(C#),如
中所述https://developers.google.com/drive/delegation
我可以使用 DriveService 对象,但 1 小时后,它会出错并出现异常:“远程服务器返回错误:(401) 未经授权。”
我知道,通过将“access_type”设置为“离线”我们可以解决这个问题,但我无法为 DriveService 对象设置此属性。
有谁知道如何刷新这个 Google Drive Service 对象?
提前致谢
【问题讨论】:
标签: oauth-2.0 google-drive-api google-oauth