Skip to content

WhatsApp Business Cloud 凭证#

¥WhatsApp Business Cloud credentials

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

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

¥WhatsApp Business Cloud

¥WhatsApp Trigger

要求#

¥Requirements

要创建 WhatsApp 凭据,你需要以下元资源:

¥To create credentials for WhatsApp, you need the following Meta assets:

  • 元数据开发者 账户:开发者账号允许你创建和管理 Meta 应用,包括 WhatsApp 集成。???备注 "设置 Meta 开发者账户"

¥A Meta developer account: A developer account allows you to create and manage Meta apps, including WhatsApp integrations. ??? note "Set up a Meta developer account" 1. 访问 Facebook 开发者网站

1
 ¥Visit the [Facebook Developers site](https://developers.facebook.com).
  1. 点击右上角的“入门指南”(如果链接显示“我的应用”,则表示你已设置开发者账户)。

    ¥Click Getting Started in the upper-right corner (if the link says My Apps, you've already set up a developer account). 3. 同意条款和条件。

    ¥Agree to terms and conditions. 4. 提供用于验证的调用号码。

    ¥Provide a phone number for verification. 5. 选择你的职业或角色。

    ¥Select your occupation or role.

  • Meta 商业组合:WhatsApp 消息服务需要一个 Meta 业务组合(以前称为 Business Manager 账户)。用户界面可能仍然显示任一选项。???备注 "设置 Meta 企业作品集"

¥A Meta business portfolio: WhatsApp messaging services require a Meta business portfolio, formerly called a Business Manager account. The UI may still show either option. ??? note "Set up a Meta business portfolio" 1. 访问 Facebook 企业网站

1
 ¥Visit the [Facebook Business site](https://business.facebook.com).
  1. 选择“创建账户”。

    ¥Select Create an account.

    • 如果你已有 Facebook 企业账户和作品集,但想要创建一个新的作品集,请打开左侧菜单中的企业作品集选择器,然后选择“创建企业作品集”。

    ¥If you already have a Facebook Business account and portfolio, but want a new portfolio, open the business portfolio selector in the left-side menu and select Create a business portfolio. 3. 输入业务组合名称。

    ¥Enter a Business portfolio name. 4. 输入你的名称。

    ¥Enter your name. 5. 输入企业邮箱。

    ¥Enter a business email. 6. 选择“提交或创建”。

    ¥Select Submit or Create.

  • 已配置 WhatsApp 的 Meta 商业应用:拥有开发者账户后,你将创建一个 Meta 业务应用。???备注 "使用 WhatsApp 设置 Meta 企业应用"

¥A Meta business app configured with WhatsApp: Once you have a developer account, you will create a Meta business app. ??? note "Set up a Meta business app with WhatsApp" 1. 访问 面向开发者的 Meta 应用仪表板

1
 ¥Visit the [Meta for Developers Apps dashboard](https://developers.facebook.com/apps/)
  1. 选择“创建应用”。

    ¥Select Create app. 3. 在“将产品添加到你的应用”中,选择 WhatsApp 图标下的“设置”。请参阅 添加 WhatsApp 产品 获取更多详细信息。

    ¥In Add products to your app, select Set up in the WhatsApp tile. Refer to Add the WhatsApp Product for more detail. 4. 这将打开 WhatsApp 快速入门页面。选择你的业务组合。

    ¥This opens the WhatsApp Quickstart page. Select your business portfolio. 5. 选择“继续”。

    ¥Select Continue. 6. 在左侧菜单中,转到“应用设置”>“基本”。

    ¥In the left-side menu, go to App settings > Basic. 7. 设置应用的隐私政策 URL 和服务条款 URL。

    ¥Set the Privacy Policy URL and Terms of Service URL for the app. 8. 将“应用模式”更改为“实时”。

    ¥Change the App Mode to Live.

支持的身份验证方法#

¥Supported authentication methods

¥API key: Use for the WhatsApp Business Cloud node.

¥OAuth2: Use for the WhatsApp Trigger node.

相关资源#

¥Related resources

有关服务的更多信息,请参阅 WhatsApp API 文档

¥Refer to WhatsApp's API documentation for more information about the service.

元数据将创建 WhatsApp Business 应用的用户分类为技术提供商;更多信息请参阅 Meta 的 技术提供商入门指南

¥Meta classifies users who create WhatsApp business apps as Tech Providers; refer to Meta's Get Started for Tech Providers for more information.

使用 API 密钥#

¥Using API key

要使用 WhatsApp 企业云 节点,你需要 WhatsApp API 密钥凭据。

¥You need WhatsApp API key credentials to use the WhatsApp Business Cloud node.

要配置此凭据,你需要:

¥To configure this credential, you'll need:

  • API 访问令牌

¥An API Access Token

  • 企业账户 ID:

¥A Business Account ID

要生成访问令牌,请按照以下步骤操作:

¥To generate an access token, follow these steps:

  1. 访问 面向开发者的 Meta 应用仪表板

¥Visit the Meta for Developers Apps dashboard. 2. 选择你的元应用。

¥Select your Meta app. 3. 在左侧菜单中,选择“WhatsApp”>“API 设置”。

¥In the left-side menu, select WhatsApp > API Setup. 4. 选择“生成访问令牌”并确认你要授予的访问权限。

¥Select Generate access token and confirm the access you want to grant. 5. 复制管理员 API 访问令牌。

¥Copy the Access token and add it to n8n as the Access Token. 6. 复制 WhatsApp Business 账户 ID,并将其作为企业账户 ID 添加到 n8n 中。

¥Copy the WhatsApp Business Account ID and add it to n8n as the Business Account ID.

有关上述步骤的更多信息,请参阅 测试 WhatsApp 企业消息

¥Refer to Test Business Messaging on WhatsApp for more information on the above steps.

完整验证和启动你的应用需要进行进一步配置。更多信息请参阅 Meta 的 技术提供商入门指南 步骤 5 及后续步骤。有关 Meta App 审核流程的更多信息,请参阅 应用审核

¥Fully verifying and launching your app will take further configuration. Refer to Meta's Get Started for Tech Providers Steps 5 and beyond for more information. Refer to App Review for more information on the Meta App Review process.

使用 OAuth2#

¥Using OAuth2

要使用 WhatsApp 触发器 节点,你需要 WhatsApp OAuth2 凭据。

¥You need WhatsApp OAuth2 credentials to use the WhatsApp Trigger node.

要配置此凭据,你需要:

¥To configure this credential, you'll need:

  • 客户端 ID

¥A Client ID

  • 客户端密钥:

¥A Client Secret

要检索这些项目,请按照以下步骤操作:

¥To retrieve these items, follow these steps:

  1. 访问 面向开发者的 Meta 应用仪表板

¥Visit the Meta for Developers Apps dashboard. 2. 选择你的元应用。

¥Select your Meta app. 3. 在左侧菜单中,选择“应用设置”>“基本”。

¥In the left-side menu, select App settings > Basic. 4. 复制应用 ID 并将其作为客户端 ID 输入到你的 n8n 凭据中。

¥Copy the App ID and enter it as the Client ID within the n8n credential. 5. 复制应用密钥并将其作为客户端密钥输入到你的 n8n 凭据中。

¥Copy the App Secret and enter it as the Client Secret within the n8n credential.

完整验证和启动你的应用需要进行进一步配置。更多信息请参阅 Meta 的 技术提供商入门指南 步骤 5 及后续步骤。有关 Meta App 审核流程的更多信息,请参阅 应用审核

¥Fully verifying and launching your app will take further configuration. Refer to Meta's Get Started for Tech Providers Steps 5 and beyond for more information. Refer to App Review for more information on the Meta App Review process.