Quick reference
| Property | Value |
|---|---|
| Platform value | threads |
| One connected account | One Threads profile. |
| Text limit | 500 characters |
| Supported | Text or one image |
| Features | Posting ✓ |
| Provider approval | Meta Threads access review |
| Token | Long-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:
- In your Meta app add the “Access the Threads API” use case; copy the Threads app ID and secret.
- Request threads_basic and threads_content_publish.
- Redirect callback URL: https://YOUR_DOMAIN/auth/callback/threads
- 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.
| Permission | Requested by default | Used for |
|---|---|---|
threads_basic | Yes | Read the profile |
threads_content_publish | Yes | Publish posts |
Connect an account
/api/v1/projects/{project_id}/connect-sessionsconnections:writeCreate 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"
}
EOFAfter 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
/api/v1/projects/{project_id}/executionsexecutions:writePublish 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
| Error | Meaning | Fix |
|---|---|---|
access_denied | The 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. |