Google API 凭据会在一周后过期

时间:2021-07-28 19:43:09

标签: google-api google-drive-api google-oauth google-developers-console

当我从 WHM 备份到我的 Google Drive 帐户时,它只能在一周内工作,之后身份验证失败。如果我重新创建凭据,它会再工作一周。有没有办法让这个凭证永不过期?我正在按照此链接中的说明创建所有内容:

https://docs.cpanel.net/knowledge-base/backup/how-to-configure-google-drive-as-a-backup-additional-destination/

1 个答案:

答案 0 :(得分:1)

如果您查看文档 experation

enter image description here

您会注意到它说 OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.

解决方案是将您的应用程序设置为生产模式并对其进行验证,这样您的刷新令牌将不会在一周后过期。