コンテンツにスキップ

接続 API

接続 API を使用すると、ブランドの下にある接続されたソーシャルメディアアカウント(Instagram、Threads、Bluesky、Facebook ページ、TikTok、YouTube)を一覧表示および検査できます。この API を使用して、対象となる connection_id を取得し、コンテンツを公開する前に権限を確認してください。


メソッドパス説明必要なスコープ
GET/v1/brand/connectionsプラットフォームによるオプションのフィルタリング付きで接続された SNS アカウントを一覧表示connections:read または *
GET/v1/brand/connections/{connection_id}接続の詳細とライブの投稿許可診断を取得connections:read または *

📋 接続一覧の取得 (GET /v1/brand/connections)

Section titled “📋 接続一覧の取得 (GET /v1/brand/connections)”

ブランドの下にあるすべての接続された 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})

Section titled “🔍 接続詳細の取得 (GET /v1/brand/connections/{connection_id})”

接続の詳細と併せて、ライブの投稿許可 (Publish Authorization) 診断を取得します。

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
}
}

認証ステータスコード (publish_authorization.status)

Section titled “認証ステータスコード (publish_authorization.status)”
ステータス意味とアクション
scope_authorized完全に承認されています。公開の準備ができています。
scope_permission_unverified検証待ちです。公開を試みることができます。
scope_permission_missing必要なスコープが不足しています。Web UI での再認証が必要です。
scope_review_disabledプラットフォームのアプリ審査ステータスまたは開発者モードの制限によりブロックされています。
unsupportedこの接続では操作がサポートされていません。