WooCommerce 凭证(WooCommerce credentials)#
你可以使用以下凭据验证以下节点:
🌐 You can use these credentials to authenticate the following nodes:
先决条件(Prerequisites)#
- 在你的 WordPress 网站上安装 WooCommerce 插件。
- 在 WordPress 中,进入 设置 > 固定链接,将你的 WordPress 固定链接设置为除 普通 之外的其他选项。
支持的身份验证方法(Supported authentication methods)#
- API 密钥
相关资源(Related resources)#
有关该服务的更多信息,请参阅 WooCommerce 的 REST API 文档。
🌐 Refer to WooCommerce's REST API documentation for more information about the service.
使用 API 密钥(Using API key)#
要配置此凭据,你需要:
🌐 To configure this credential, you'll need:
- 一个 消费者密钥:在生成 API 密钥时创建。
- 一个 消费者密钥:在生成 API 密钥时创建。
- 一个 WooCommerce URL
生成 API 密钥并设置你的凭据:
🌐 To generate an API key and set up your credential:
- 前往 WooCommerce > 设置 > 高级 > REST API > 添加密钥。
- 从 权限 下拉菜单中选择 读/写。
- 复制生成的 Consumer Key 和 Consumer Secret 并将它们输入到你的 n8n 凭证中。
- 将你的 WordPress 站点 URL 输入为 WooCommerce URL。
- 默认情况下,n8n 会在 Authorization 头中传递你的凭证详细信息。如果你需要将其作为查询字符串参数传递,请开启 在查询中包含凭证。
有关更多信息,请参阅 生成密钥。
🌐 Refer to Generate Keys for more information.
解决“缺少消费者密钥”错误(Resolve "Consumer key is missing" error)#
当你尝试连接你的凭据时,可能会收到类似这样的错误:Consumer key is missing。
🌐 When you try to connect your credentials, you may receive an error like this: Consumer key is missing.
当服务器无法解析通过 SSL 进行身份验证时的 Authorization 标头详细信息时,会发生此错误。
🌐 This occurs when the server can't parse the Authorization header details when authenticating over SSL.
要解决此问题,请打开 在查询中包含凭据 切换,以将消费者密钥/密钥作为查询字符串参数传递,然后重试凭据。
🌐 To resolve it, turn on the Include Credentials in Query toggle to pass the consumer key/secret as query string parameters instead and retry the credential.