Threads Setup
Get a long-lived Threads access token and your Threads User ID. This one lives on Meta's developer platform (same as Facebook and Instagram) but has its own App ID and App Secret, separate from the main Meta app. Don't mix them up.
Get a long-lived Threads access token and your Threads User ID. This one lives on Meta's developer platform (same as Facebook and Instagram) but has its own App ID and App Secret, separate from the main Meta app. Don't mix them up.
social_threads_token, a long-lived access token (60-day lifetime, refreshable)social_threads_user_id, a numeric User IDYou can also add the Threads use case to an existing Meta app. Left sidebar, Use cases, Add use case, Access the Threads API.
Here's the trap: a Threads use-case app has two App IDs and two App Secrets, one for the parent Meta app, one for Threads specifically. You need the Threads pair, not the parent one.
If you accidentally use the parent Meta app ID in OAuth calls, you'll get confusing invalid_client errors. Always use the Threads pair.
Still inside Use cases, Access the Threads API, Customize:
threads_basic (required for everything)threads_content_publish (required to post)threads_manage_insights (optional, metrics)https://getartdrop.com/).A Threads use-case app starts in Development mode. In dev mode, only the app's own admins and testers can authorize it. That's fine for single-user use, you don't need App Review.
Do NOT flip the app to Live mode. Live mode requires full App Review, which takes 2 to 4 weeks and needs a screencast of the user flow. Totally unnecessary for personal use.
Build this URL, swap in your THREADS_APP_ID and redirect URL:
https://threads.net/oauth/authorize
?client_id={THREADS_APP_ID}
&redirect_uri={REDIRECT_URL}
&scope=threads_basic,threads_content_publish,threads_manage_insights
&response_type=code
&state=artdrop-setup
Paste it into a browser where you're logged into Threads. Hit Authorize. Threads redirects back to your redirect URL with a ?code=... param in the address bar.
Copy the code value out of the URL. Use it in the next step within a few minutes. Codes expire fast.
POST to the token endpoint. Easiest with curl:
curl -X POST https://graph.threads.net/oauth/access_token \
-F client_id={THREADS_APP_ID} \
-F client_secret={THREADS_APP_SECRET} \
-F grant_type=authorization_code \
-F redirect_uri={REDIRECT_URL} \
-F code={CODE_FROM_STEP_5}
Response:
{ "access_token": "THAAx...", "user_id": 123456789012345 }
Copy the access_token. That's the short-lived version (~1 hour). Also grab user_id, that's the Threads User ID for ArtDrop.
curl -G https://graph.threads.net/access_token \
-d grant_type=th_exchange_token \
-d client_secret={THREADS_APP_SECRET} \
-d access_token={SHORT_TOKEN_FROM_STEP_6}
Response gives you a new access_token good for 60 days.
ArtDrop auto-refreshes this token before it expires. If ArtDrop is offline or uninstalled past the 60-day mark, the token dies and you'll need to redo from Step 5.
Back in ArtDrop's Social page, Threads section:
Hit Save. ArtDrop calls /me?fields=id,username to verify, and you'll see the linked username immediately if it worked.
Threads OAuth is the most finicky of all five because of the two-App-ID quirk. If Step 6 is returning invalid_client or invalid_grant, screenshot the Meta app's Use cases, Access the Threads API, Customize, Settings screen and email support@getartdrop.com. We'll verify you're using the right IDs.
Official reference: Threads Get Started, Long-Lived Tokens.