Skip to content

WooCommerce 凭据#

您可以使用这些凭据来验证以下节点:

前提条件#

  • 在您的WordPress网站上安装 WooCommerce 插件。
  • 在WordPress中,转到 Settings > Permalinks 并将您的WordPress固定链接设置为使用 Plain 以外的其他选项。

支持的验证方法#

  • API key

相关资源#

参考 WooCommerce's REST API documentation 了解更多关于该服务的信息。

使用 API key#

要配置此凭据,您需要:

  • Consumer Key: 生成API密钥时创建。
  • Consumer Secret: 生成API密钥时创建。
  • WooCommerce URL

要生成API密钥并设置您的凭据:

  1. 转到 WooCommerce > Settings > Advanced > Rest API > Add key
  2. Permissions 下拉菜单中选择 Read/Write
  3. 复制生成的 Consumer KeyConsumer Secret 并将它们输入到您的n8n凭据中。
  4. 将您的WordPress站点URL输入为 WooCommerce URL
  5. 默认情况下,n8n在授权标头中传递您的凭据详细信息。如果您需要将它们作为查询字符串参数传递,请启用 Include Credentials in Query 在查询中包含凭据

参考 Generate Keys 了解更多信息。

解决"Consumer key is missing"错误#

当您尝试连接凭据时,可能会收到类似这样的错误:Consumer key is missing

这发生在通过SSL进行身份验证时服务器无法解析授权标头详细信息时。

要解决此问题,请启用 Include Credentials in Query 在查询中包含凭据 切换,以将consumer key/secret作为查询字符串参数传递,并重试凭据。