Skip to content

Twist 凭证(Twist credentials)#

你可以使用以下凭据验证以下节点:

🌐 You can use these credentials to authenticate the following nodes:

先决条件(Prerequisites)#

支持的身份验证方法(Supported authentication methods)#

  • OAuth2

有关如何使用该服务进行身份验证的更多信息,请参阅 Twist 的 API 文档

🌐 Refer to Twist's API documentation for more information about authenticating with the service.

使用 OAuth2(Using OAuth2)#

要配置此凭据,你需要:

🌐 To configure this credential, you'll need:

  • A 客户端 ID:在你创建通用集成时生成。
  • 一个 客户端密钥:在你创建通用集成时生成。

要生成你的客户端 ID 和客户端密钥,请创建一个通用集成

🌐 To generate your Client ID and Client Secret, create a general integration.

请为你的集成使用这些 OAuth 身份验证 设置:

🌐 Use these settings for your integration's OAuth Authentication:

  • 从 n8n 复制 OAuth 重定向 URL,并将其作为 OAuth 2 重定向 URL 输入到 Twist 中。

    用于自托管 n8n 的 OAuth 重定向 URL

    Twist 不接受 localhost 重定向 URL。重定向 URL 应该是你自己域名下的 URL,例如:https://mytemplatemaker.example.com/gr_callback。如果你的 n8n OAuth 重定向 URL 包含 localhost,请参考下方的 本地环境重定向 URL 来生成 Twist 允许的 URL。

  • 选择 更新 OAuth 设置 以保存这些更改。

  • 从 Twist 复制 Client IDClient Secret,并将它们输入到 n8n 的相应字段中。

本地环境重定向 URL(Local environment redirect URL)#

Twist 不接受本地主机回调 URL。以下步骤应允许你为本地环境配置 OAuth 凭据:

🌐 Twist doesn't accept a localhost callback URL. These steps should allow you to configure the OAuth credentials for the local environment:

  1. 使用 ngrok 将本地运行在 5678 端口的服务器暴露到互联网。在终端中运行以下命令:
1
ngrok http 5678
  1. 在新的终端中运行以下命令。将 <YOUR-NGROK-URL> 替换为上一步获取的 URL。
1
export WEBHOOK_URL=<YOUR-NGROK-URL>
  1. 在 Twist 中将生成的 URL 用作你的 OAuth 2 重定向 URL