Duaer

集成

在 Duaer 里配置 Google 凭证

在 Duaer 中保存 Google 的连接信息,供工作流程节点在运行时使用。密钥经实例加密密钥保护,不会写进节点参数。

获取 Gemini API 密钥

Duaer 的 Google Gemini(PaLM) Api 凭证用 Google AI Studio 的 API 密钥:

  1. 登录 Google AI Studio,点 Create API key,选一个 Google Cloud 项目。
  2. 复制密钥,在 Duaer 里新建 Google Gemini(PaLM) Api 凭证,粘到 API Key。
  3. Host 保持默认的 https://generativelanguage.googleapis.com,只在走代理时修改。

这一页的 Google Workspace Admin 和 YouTube 凭证是 OAuth 类型,OAuth 客户端的创建方法见 Google OAuth 单服务凭证。

Google Workspace Admin OAuth2 API

在 Duaer 里新建 Google Workspace Admin OAuth2 API 凭证,填写这些字段:

  • Client ID(必填)
  • Client Secret(必填,密钥)
  • Custom Scopes:自定义授权范围。默认关闭。
  • Enabled Scopes:要启用的授权范围。已预填,Custom Scopes 打开时显示。

Duaer 对这种类型固定使用 OAuth2 Authorization Code(授权码) 授权方式。

在服务商的应用设置里登记 Duaer 凭证窗口显示的 OAuth 重定向地址(https://<你的 Duaer 地址>/rest/oauth2-credential/callback),再在 Duaer 里点「连接我的账号」并同意授权。

Duaer 默认申请的授权范围:https://www.googleapis.com/auth/admin.directory.group https://www.googleapis.com/auth/admin.directory.user https://www.googleapis.com/auth/admin.directory.domain.readonly https://www.googleapis.com/auth/admin.directory.userschema.readonly https://www.googleapis.com/auth/admin.directory.device.chromeos https://www.googleapis.com/auth/admin.directory.orgunit.readonly。

所有 Duaer OAuth2 凭证共有的可选设置:Ignore SSL Issues (Insecure)、Token Expired Status Code、Encrypted Tokens (JWE)、JWKS URI。说明见 OAuth2 API。

使用它的 Duaer 节点:Google Workspace Admin。

YouTube OAuth2 API

在 Duaer 里新建 YouTube OAuth2 API 凭证,填写这些字段:

  • Client ID(必填)
  • Client Secret(必填,密钥)
  • Custom Scopes:自定义授权范围。默认关闭。
  • Enabled Scopes:要启用的授权范围。已预填,Custom Scopes 打开时显示。

Duaer 对这种类型固定使用 OAuth2 Authorization Code(授权码) 授权方式。

在服务商的应用设置里登记 Duaer 凭证窗口显示的 OAuth 重定向地址(https://<你的 Duaer 地址>/rest/oauth2-credential/callback),再在 Duaer 里点「连接我的账号」并同意授权。

Duaer 默认申请的授权范围:https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtubepartner-channel-audit。

所有 Duaer OAuth2 凭证共有的可选设置:Ignore SSL Issues (Insecure)、Token Expired Status Code、Encrypted Tokens (JWE)、JWKS URI。说明见 OAuth2 API。

使用它的 Duaer 节点:YouTube。

Google Gemini(PaLM) Api

在 Duaer 里新建 Google Gemini(PaLM) Api 凭证,填写这些字段:

  • Host(必填):默认 https://generativelanguage.googleapis.com。
  • API Key(必填,密钥)

保存时,Duaer 会用这些值测试一次连接。

使用它的 Duaer 节点:Google Gemini、Embeddings Google Gemini、Google Gemini Chat Model。

在 Duaer 里保存连接

打开 Credentials,创建 Google。按字段填写密钥、OAuth 或服务器地址。保存后,工作流程节点引用这份凭证,而不是把密钥写进参数。

凭证内容经实例的加密密钥保护。换密钥或弄丢密钥后,已存凭证会解不开,见托管文档里的加密密钥说明。

谁能用这份凭证

能否看到或编辑,取决于项目和角色。不要把密钥贴进聊天或变量。外部密钥库见外部密钥文档。

常见问题

Duaer 的 Google 凭证密钥会出现在节点参数里吗?

不会。在 Duaer 里,Google 的密钥保存在凭证中,节点只引用凭证。执行记录也不应出现明文密钥。

在 Duaer 里 Google 凭证保存失败常见原因是什么?

字段填错、OAuth 回调地址与实例 URL 不一致,或当前角色不能创建凭证。先核对 Google 服务商要求的字段,再确认你在该项目里有权新建凭证。

同组