Skip to content
techrace/
TECHRACE DOCUMENTATION

Threads

Connect a Threads profile and publish text or image posts.

Quick reference

PropertyValue
Platform valuethreads
One connected accountOne Threads profile.
Text limit500 characters
SupportedText or one image
FeaturesPosting ✓
Provider approvalMeta Threads access review
TokenLong-lived, extended automatically before it expires

Before you start

The person connecting needs:

  • A Threads profile.
  • While your Meta app is in Development mode: added as a Threads tester, invite accepted.

You (the platform owner) need:

  1. In your Meta app add the “Access the Threads API” use case; copy the Threads app ID and secret.
  2. Request threads_basic and threads_content_publish.
  3. Redirect callback URL: https://YOUR_DOMAIN/auth/callback/threads
  4. Add Threads testers while in Development mode.

Permissions (scopes)

Techrace puts these permissions in the login link. The person approves them on the provider's own screen; only approved permissions are granted.

PermissionRequested by defaultUsed for
threads_basicYesRead the profile
threads_content_publishYesPublish posts

Connect an account

POST/api/v1/projects/{project_id}/connect-sessionsconnections:write

Create a connect link with provider "threads" and send the person's browser to the returned url. return_url is the page in your app where they land afterwards (https, or http://localhost while testing).

curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/connect-sessions" \
  -H "Authorization: Bearer $TECHRACE_API_KEY" \
  -H "Content-Type: application/json" \
  --data @- <<EOF
{
  "customer_id": "$CUSTOMER_ID",
  "provider": "threads",
  "return_url": "https://your-app.com/integrations/done"
}
EOF

After approval the person lands on your return_url with ?connected=threads&customer_id=…&connection_id=…, or ?error=access_denied|expired|failed&provider=threads. Your webhook also receives account.connected. Keep the connection_id: every call below uses it.

Publish a post

POST/api/v1/projects/{project_id}/executionsexecutions:write

Publish text, or text with one image.

curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/executions" \
  -H "Authorization: Bearer $TECHRACE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: unique-key-per-post" \
  --data @- <<EOF
{
  "customer_id": "$CUSTOMER_ID",
  "connection_id": "$CONNECTION_ID",
  "action": "publish",
  "input": {
    "content": "Opening our second store next week!"
  }
}
EOF
  • Publishing is asynchronous: the response has status queued. Poll GET /executions/{id} or subscribe to execution.succeeded / execution.failed.
  • Upload images or video first with POST /customers/{customer_id}/media and pass the returned media IDs in media_ids.
  • Re-sending the same Idempotency-Key never posts twice.
  • Text up to 500 characters.

Limitations

  • Publishing only: no analytics, comments or messages yet.
  • One image per post.

Common errors

ErrorMeaningFix
access_deniedThe person cancelled.Try again and approve.
Invalid redirect URI (Threads screen)Callback not registered.Add https://YOUR_DOMAIN/auth/callback/threads in the Threads use case settings.