Skip to content

Magento 2 凭据(Magento 2 credentials)#

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

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

先决条件(Prerequisites)#

  • 创建一个 Magento (Adobe Commerce) 账户。
  • 将你的商店设置为 允许使用 OAuth 访问令牌作为独立的 Bearer 令牌
    • 转到 管理员 > 商店 > 配置 > 服务 > OAuth > 消费者设置
    • 允许将 OAuth 访问令牌作为独立的 Bearer 令牌使用 选项设置为
    • 你还可以通过运行以下命令从 CLI 启用此设置:

      1
      bin/magento config:set oauth/consumer/enable_integration_as_bearer 1
      

这一步是必要的,直到 n8n 更新 Magento 2 凭证以使用 OAuth。有关更多信息,请参阅 集成令牌

🌐 This step is necessary until n8n updates the Magento 2 credentials to use OAuth. Refer to Integration Tokens for more information.

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

  • API 访问令牌

有关该服务的更多信息,请参考 Magento 的 API 文档

🌐 Refer to Magento's API documentation for more information about the service.

使用 API 访问令牌(Using API access token)#

要配置此凭据,你需要:

🌐 To configure this credential, you'll need:

  • 主机:输入你的 Magento 商店地址。
  • 一个 访问令牌:从 管理面板 获取访问令牌:
    1. 前往 系统 > 扩展 > 集成
    2. 添加新的集成
    3. 转到 API 选项卡,并选择你希望 n8n 集成访问的 Magento 资源。
    4. 集成 页面,激活 新的集成。
    5. 选择 允许 以显示你的访问令牌,这样你就可以复制它并在 n8n 中输入。