Skip to content

Xero credentials#

คุณสามารถใช้ credentials นี้เพื่อ authenticate กับ node เหล่านี้:

Prerequisites#

สมัคร Xero ให้เรียบร้อยก่อน

Supported authentication methods#

  • OAuth2

ดูรายละเอียดเพิ่มเติมเกี่ยวกับการใช้งาน API ได้ที่ Zero's API documentation

Using OAuth2#

ถ้าจะตั้งค่า credentials นี้ คุณต้องมี:

  • Client ID: ได้จากการสร้างแอปใหม่สำหรับ custom connection
  • Client Secret: ได้จากการสร้างแอปใหม่สำหรับ custom connection

สร้าง Client ID และ Client Secret ได้โดย สร้าง OAuth2 custom connection app ใน Xero developer portal ที่ My Apps

ตั้งค่าแอปตามนี้:

Xero App Name

Xero ไม่อนุญาตให้ใช้ชื่อแอปที่มีคำว่า n8n ใน Xero Developer Centre

  • เลือก Web app ใน Integration Type
  • สำหรับ Company or Application URL ให้ใส่ URL ของ n8n server หรือ reverse proxy ของคุณ (เช่น cloud user: https://your-username.app.n8n.cloud/)
  • คัดลอก OAuth Redirect URL จาก n8n ไปใส่ใน OAuth 2.0 redirect URI ของแอป
  • เลือก scopes ที่เหมาะสมกับแอป ดูรายละเอียดที่ OAuth2 Scopes
    • ถ้าต้องการใช้ทุกฟีเจอร์ใน Xero node ให้เพิ่ม scope accounting.contacts และ accounting.transactions

ดูรายละเอียดเพิ่มเติมที่ OAuth Custom Connections