threads
Installation
SKILL.md
Call the Threads API (graph.threads.net) with curl + jq. The connector
injects one credential: $THREADS_ACCESS_TOKEN (a long-lived Threads access
token with the threads_basic + threads_content_publish scopes). Never echo it.
Resolve the caller's Threads user id once (every publish needs it):
ME=$(curl -sS "https://graph.threads.net/v1.0/me?fields=id,username&access_token=$THREADS_ACCESS_TOKEN")
TID=$(echo "$ME" | jq -r .id)
echo "$ME" # {"id":"<THREADS_USER_ID>","username":"..."}
Errors are JSON with error.message / error.code — show them verbatim.
401 / OAuthException → the token expired or lacks scope; reconnect the
Threads connector.