Skip to content

Dropbox credentials#

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

Supported authentication methods#

  • API access token: Dropbox แนะนำวิธีนี้สำหรับการทดสอบกับบัญชีผู้ใช้ของคุณ และให้สิทธิ์การเข้าถึงแก่ผู้ใช้จำนวนจำกัด
  • OAuth2: Dropbox แนะนำวิธีนี้สำหรับ production หรือสำหรับการทดสอบกับผู้ใช้มากกว่า 50 คน

App reuse

คุณสามารถเปลี่ยน app จาก API access token ไปเป็น OAuth2 ได้โดยการสร้าง credential ใหม่ใน n8n สำหรับ OAuth2 โดยใช้ app เดิม

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

Using access token#

ถ้าจะตั้งค่า credentials นี้ คุณต้องมีบัญชี Dropbox developer และ:

  • Access Token: สร้างขึ้นเมื่อคุณสร้าง Dropbox app
  • App Access Type

วิธีตั้งค่า credential โดยสร้าง Dropbox app:

  1. เปิด App Console ใน Dropbox developer portal
  2. เลือก Create app
  3. ใน Choose an API เลือก Scoped access
  4. ใน Choose the type of access you need เลือกตัวเลือกที่เหมาะสมกับการใช้งาน Dropbox node ของคุณมากที่สุด:
    • App folder: ให้สิทธิ์เข้าถึงเฉพาะ folder ที่สร้างขึ้นสำหรับ app ของคุณเท่านั้น
    • Full Dropbox: ให้สิทธิ์เข้าถึงไฟล์ทั้งหมดในบัญชี Dropbox ของผู้ใช้
  5. ตั้งชื่อ app ของคุณ เช่น n8n integration
  6. เลือก Create app รายละเอียด app จะเปิดขึ้น
  7. ในแท็บ Permissions เลือก permission ที่ต้องการสำหรับ app ของคุณ n8n แนะนำให้เลือก permission เหล่านี้สำหรับ Dropbox node:
    • files.metadata.write
    • files.metadata.read
    • files.content.write
    • files.content.read
    • sharing.write
    • sharing.read
    • file_requests.write
    • file_requests.read
  8. เลือก Submit เพื่อบันทึกการเปลี่ยนแปลง permission
  9. ในแท็บ Settings คัดลอก App key และ App secret ไปใส่ใน n8n credential ของคุณ
  10. ในส่วน Generated access token เลือก Generate เพื่อสร้าง access token
  11. คัดลอก access token ที่สร้างขึ้นแล้วนำไปใส่ใน n8n credential ของคุณ

ดูข้อมูลเพิ่มเติมได้ที่ Dropbox Building an App documentation

Using OAuth2#

หมายเหตุสำหรับผู้ใช้ n8n Cloud

ผู้ใช้ Cloud ไม่จำเป็นต้องให้รายละเอียดการเชื่อมต่อ เลือก Connect my account เพื่อเชื่อมต่อผ่านเบราว์เซอร์ของคุณ

หากคุณต้องการตั้งค่า OAuth2 ด้วยตัวเอง หรือต้องการรายละเอียดเพิ่มเติมเกี่ยวกับขั้นตอน OAuth web flow คุณจะต้องสร้าง Dropbox app:

  1. ทำตามขั้นตอน 1-9 ในส่วน Using access token ด้านบน
  2. ใน n8n คัดลอก OAuth Callback URL
  3. ใน Dropbox app ของคุณ ไปที่แท็บ Settings
  4. ในส่วน OAuth 2 เพิ่ม Redirect URIs โดยใส่ URL ที่คัดลอกมาจาก n8n
  5. เลือก Add
  6. เลือก Connect my account ใน n8n และทำตามคำแนะนำบนหน้าจอเพื่อเชื่อมต่อ credential ให้เสร็จสิ้น

ดูข้อมูลเพิ่มเติมได้ที่ Dropbox OAuth Guide