Magento 2 凭据#
您可以使用这些凭据来验证以下节点:
先决条件#
- 创建一个 Magento 账户。
- 将您的商店设置为 Allow OAuth Access Tokens to be used as standalone Bearer tokens。
- 转到 Admin > Stores > Configuration > Services > OAuth > Consumer Settings。
- 将 Allow OAuth Access Tokens to be used as standalone Bearer tokens 选项设置为 Yes。
-
您也可以通过运行以下命令从 CLI 启用此设置:
1
bin/magento config:set oauth/consumer/enable_integration_as_bearer 1
此步骤是必要的,直到 n8n 更新 Magento 2 凭据以使用 OAuth。参考 Integration Tokens了解更多信息。
支持的认证方法#
- API access token
相关资源#
参考 Magento 的 API 文档了解有关该服务的更多信息。
使用 API access token#
要配置此凭据,您需要:
- 一个 Host 主机:输入您的 Magento 商店地址。
- 一个 Access Token 访问令牌:从 Admin Panel 获取访问令牌:
- 转到 System > Extensions > Integrations。
- 添加新的 Integration。
- 转到 API 选项卡并选择您希望 n8n 集成访问的 Magento 资源。
- 从 Integrations 页面,Activate 新的集成。
- 选择 Allow 显示您的访问令牌,以便您可以复制它并在 n8n 中输入。