Skip to content

Magento 2 credentials#

คุณสามารถใช้ credentials เหล่านี้เพื่อยืนยันตัวตนใน node ต่อไปนี้:

Prerequisites#

  • สร้างบัญชี 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 จะอัปเดต credentials ของ Magento 2 ให้ใช้ OAuth อ้างอิง Integration Tokens สำหรับข้อมูลเพิ่มเติม

Supported authentication methods#

  • API access token

อ้างอิง Magento's API documentation สำหรับข้อมูลเพิ่มเติมเกี่ยวกับบริการนี้

Using API access token#

ในการกำหนดค่า credential นี้ คุณจะต้องมี:

  • Host: ป้อนที่อยู่ของร้านค้า Magento ของคุณ
  • Access Token: รับ access token จาก Admin Panel:
    1. ไปที่ System > Extensions > Integrations
    2. เพิ่ม Integration ใหม่
    3. ไปที่แท็บ API และเลือก Magento resources ที่คุณต้องการให้ n8n integration เข้าถึง
    4. จากหน้า Integrations Activate integration ใหม่
    5. เลือก Allow เพื่อแสดง access token ของคุณเพื่อให้คุณสามารถคัดลอกและป้อนลงใน n8n