ข้ามไปยังเนื้อหา

API การเชื่อมต่อ

API การเชื่อมต่อช่วยให้คุณแสดงรายการและตรวจสอบบัญชีโซเชียลมีเดียที่เชื่อมต่อกับแบรนด์ (Instagram, Threads, Bluesky, Facebook Page, TikTok และ YouTube) ใช้ API นี้เพื่อดู connection_id เป้าหมายและตรวจสอบสิทธิ์ก่อนเผยแพร่เนื้อหา


เมธอดพาธคำอธิบายขอบเขตสิทธิ์ที่จำเป็น
GET/v1/brand/connectionsรายชื่อบัญชี SNS ที่เชื่อมต่อ พร้อมตัวกรองแพลตฟอร์มconnections:read หรือ *
GET/v1/brand/connections/{connection_id}ดึงรายละเอียดการเชื่อมต่อและผลตรวจสอบสิทธิ์ปัจจุบันconnections:read หรือ *

ดึงบัญชี SNS ทั้งหมดที่เชื่อมต่ออยู่ภายใต้แบรนด์

พารามิเตอร์ประเภทจำเป็นคำอธิบาย
sns_typestringไม่จำเป็นกรองตาม instagram, threads, bluesky, facebook_page, tiktok หรือ youtube
Terminal window
curl -X GET "https://api.ankk.app/v1/brand/connections?sns_type=instagram" \
-H "Authorization: Bearer spk_live_xxxxxxxx"
{
"items": [
{
"id": "conn_01jm8x9k2example",
"sns_type": "instagram",
"platform": "meta.instagram",
"display_name": "ACME Official",
"username": "acme_official",
"profile_image_url": "https://example.com/profiles/acme.jpg",
"status": "connected",
"created_at": "2026-08-01T10:00:00Z"
}
]
}

🔍 ดึงรายละเอียดการเชื่อมต่อ (GET /v1/brand/connections/{connection_id})

หัวข้อที่มีชื่อว่า “🔍 ดึงรายละเอียดการเชื่อมต่อ (GET /v1/brand/connections/{connection_id})”

ดึงรายละเอียดการเชื่อมต่อพร้อมผลตรวจสอบ สิทธิ์การเผยแพร่ ปัจจุบัน

Terminal window
curl -X GET "https://api.ankk.app/v1/brand/connections/conn_01jm8x9k2example" \
-H "Authorization: Bearer spk_live_xxxxxxxx"
{
"id": "conn_01jm8x9k2example",
"sns_type": "instagram",
"platform": "meta.instagram",
"display_name": "ACME Official",
"username": "acme_official",
"profile_image_url": "https://example.com/profiles/acme.jpg",
"status": "connected",
"created_at": "2026-08-01T10:00:00Z",
"publish_authorization": {
"status": "scope_authorized",
"required_scopes": ["instagram_business_basic", "instagram_business_content_publish"],
"missing_scopes": [],
"retryable": false
}
}
สถานะความหมายและการดำเนินการ
scope_authorizedได้รับการอนุญาตครบถ้วน พร้อมสำหรับการเผยแพร่
scope_permission_unverifiedอยู่ระหว่างการตรวจสอบ สามารถลองเผยแพร่ได้
scope_permission_missingขาดขอบเขตสิทธิ์ที่จำเป็น ต้องยืนยันตัวตนใหม่ผ่าน Web UI
scope_review_disabledถูกบล็อกโดยสถานะการตรวจสอบแอปของแพลตฟอร์มหรือขีดจำกัดโหมดนักพัฒนา
unsupportedไม่รองรับการดำเนินการนี้ในการเชื่อมต่อนี้