> For the complete documentation index, see [llms.txt](https://doc.duaer.com/zh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/zh/integrations/builtin/app-nodes/duaer-nodes-base.googledrive/common-issues.md).

# Duaer 里 Google Drive 的常见问题

Duaer 里 Google Drive 节点的常见问题：应用未经验证、授权过期、OAuth 报错、取最近的文件。
## Google hasn't verified this app <a href="#google-hasnt-verified-this-app" id="google-hasnt-verified-this-app"></a>

OAuth 应用的 User Type 是 Internal 时，用同一个 Google Workspace 账号创建和登录。是 External 时，在 Google Cloud 控制台的 Audience 页把登录用的邮箱加进 Test users。

## 授权过几天就失效 <a href="#google-cloud-app-becoming-unauthorized" id="google-cloud-app-becoming-unauthorized"></a>

Publishing status 为 Testing、User type 为 External 的应用，授权 7 天后过期。在 Duaer 里重新连接凭证，或把应用发布为 In production。

## Google Drive OAuth 报错 <a href="#google-drive-oauth-error" id="google-drive-oauth-error"></a>

多半是 Google 里登记的重定向地址和 Duaer 凭证里的 OAuth Redirect URL 不一致。先看 Google 报错里的链接。自托管 Duaer 还要确认 DUAER_EDITOR_BASE_URL 和 DUAER_WEBHOOK_URL 是完整的公网域名。

## 取最近修改的文件 <a href="#get-recent-files-from-google-drive" id="get-recent-files-from-google-drive"></a>

1. Google Drive 节点选 File/Folder → Search，打开 Return All。
2. Filter 里把 What to Search 设为 Files，Options 里把 Fields 设为 *。
3. 接一个 [Sort](/zh/integrations/builtin/core-nodes/duaer-nodes-base.sort.md)，按 modifiedTime 降序。
4. 再接一个 Limit 取第一条，用它的 id 交给下一个 Google Drive 节点。
## Questions

### Duaer 的 Google 凭证为什么 7 天后失效？

Google OAuth 应用处于 Testing 且为 External 时，授权 7 天过期。在 Duaer 里重新连接，或把应用发布为 In production。

