接続 API
接続 API を使用すると、ブランドの下にある接続されたソーシャルメディアアカウント(Instagram、Threads、Bluesky、Facebook ページ、TikTok、YouTube)を一覧表示および検査できます。この API を使用して、対象となる connection_id を取得し、コンテンツを公開する前に権限を確認してください。
📌 エンドポイント
Section titled “📌 エンドポイント”| メソッド | パス | 説明 | 必要なスコープ |
|---|---|---|---|
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 アカウントを取得します。
クエリパラメータ
Section titled “クエリパラメータ”| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
sns_type | string | 任意 | instagram, threads, bluesky, facebook_page, tiktok, または youtube でフィルタ |
リクエスト例
Section titled “リクエスト例”curl -X GET "https://api.ankk.app/v1/brand/connections?sns_type=instagram" \ -H "Authorization: Bearer spk_live_xxxxxxxx"レスポンス例 (200 OK)
Section titled “レスポンス例 (200 OK)”{ "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) 診断を取得します。
リクエスト例
Section titled “リクエスト例”curl -X GET "https://api.ankk.app/v1/brand/connections/conn_01jm8x9k2example" \ -H "Authorization: Bearer spk_live_xxxxxxxx"レスポンス例 (200 OK)
Section titled “レスポンス例 (200 OK)”{ "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 | この接続では操作がサポートされていません。 |