Skip to content

Threads API Setup

Admin walkthrough for the Threads (Meta) integration. End-user flow: Connections → Threads.

Overview

Form fieldOptions key
App IDthreads_app-id
App Secretthreads_app-secret
Statusthreads_integration_status

ENV fallback: THREADS_APP_ID + THREADS_APP_SECRET.

Threads uses its own Meta app

Even though Threads is a Meta product, it requires a separate Meta app with the Threads product enabled — you cannot reuse the Facebook/Instagram app you already configured. The OAuth flow is different (Threads uses the Threads Graph API, not the Facebook Graph API).

Step-by-step on developers.facebook.com

1. Create a new Meta app for Threads

https://developers.facebook.comMy Apps → Create App → app type Business → name it (e.g. "Sosyabot Threads").

2. Add the Threads product

In the app dashboard click Add Product and select Threads. Accept the Threads API terms when prompted.

3. Configure Threads → Use Cases

Open Threads → Use Cases. Configure:

  • Use case: Access the Threads API.
  • Threads → Settings → Redirect Callback URLs:
    https://app.sosyabot.com/api/v1/auth/threads/callback

4. Required permissions

threads_basic, threads_content_publish. Both are auto-granted in Development mode for invited testers; production publishing requires Meta App Review of the Threads use case.

5. Grab App ID + App Secret

Settings → Basic of the new app. Copy App ID and reveal/copy App Secret.

Pasting into Sosyabot admin panel

/admin/api-integration/threads. Paste, Enable, Save, Test credentials.

Failure: Threads integration disabled: app id/secret not configured.

Verification

/app/channels → Connect → Threads → OAuth → approve. Post a short text-only thread from /app/publishing.

Troubleshooting

SymptomCauseFix
Threads integration disabled: app id/secret not configuredAdmin + ENV emptySteps 1–5.
Threads access not enabled for this appThreads product not addedComplete step 2.
Long-lived token expires after 60 daysDefault Threads token TTLSosyabot auto-refreshes via the tokenRefresh.queue.ts worker every 7 days before expiry — confirm the worker is running (./service.sh logs worker).
Invalid OAuth access token after upgradeApp Secret rotatedReconnect affected users.

ENV fallback

THREADS_APP_ID=<your app id>
THREADS_APP_SECRET=<your app secret>

After editing .env run ./service.sh restart api.