Skip to content

Twist 凭证#

¥Twist credentials

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

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

先决条件#

¥Prerequisites

¥Create a Twist account.

¥Create a general integration and configure a valid OAuth Redirect URL. Refer to Using OAuth2 for more information.

支持的身份验证方法#

¥Supported authentication methods

  • OAuth2

相关资源#

¥Related resources

有关服务身份验证的更多信息,请参阅 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:

  • 客户端 ID:创建通用集成后生成。

¥A Client ID: Generated once you create a general integration.

  • 客户端密钥:创建通用集成后生成。

¥A Client Secret: Generated once you create a general integration.

生成客户端 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 中。

¥Copy the OAuth Redirect URL from n8n and enter it as the OAuth 2 redirect URL in Twist.

OAuth Redirect URL for self-hosted n8n

1
Twist doesn't accept a `localhost` Redirect URL. The Redirect URL should be a URL in your domain, for example: `https://mytemplatemaker.example.com/gr_callback`. If your n8n **OAuth Redirect URL** contains localhost, refer below to [Local environment redirect URL](#local-environment-redirect-url) for generating a URL that Twist will allow.
  • 选择“更新 OAuth 设置”以保存这些更改。

¥Select Update OAuth settings to save those changes.

  • 复制 Twist 中的客户端 ID 和客户端密钥,并将其输入到 n8n 的相应字段中。

¥Copy the Client ID and Client Secret from Twist and enter them in the appropriate fields in n8n.

本地环境重定向 URL#

¥Local environment redirect URL

Twist 不接受 localhost 回调 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 上的本地服务器暴露给互联网。在你的终端中,运行以下命令:

¥Use ngrok to expose the local server running on port 5678 to the internet. In your terminal, run the following command:

1
ngrok http 5678
  1. 在新终端中运行以下命令。将 <YOUR-NGROK-URL> 替换为你从上一步中获得的 URL。

¥Run the following command in a new terminal. Replace <YOUR-NGROK-URL> with the URL that you get from the previous step.

1
export WEBHOOK_URL=<YOUR-NGROK-URL>
  1. 在 Twist 中,将生成的 URL 用作 OAuth 2 重定向 URL。

¥Use the generated URL as your OAuth 2 redirect URL in Twist.