ข้ามไปยังเนื้อหา

CLI

เนื้อหานี้ยังไม่มีในภาษาของคุณ

Set the named API key created in the web app:

Terminal window
export ANKK_THREADS_API_KEY="<your-api-key>"

The CLI targets https://threads-api.ankk.app by default. For local development, use the named HTTPS tunnel:

Terminal window
export ANKK_THREADS_API_BASE_URL="https://threads-api-dev.ankk.app"

Common commands:

Terminal window
ankk-threads accounts list
ankk-threads content list
ankk-threads content create --account-id <uuid> --text "Hello Threads"
ankk-threads content publish <content-id>
ankk-threads status <job-id> --kind publish
ankk-threads uploads put image.jpg --content-type image/jpeg
ankk-threads listening add threads --account-id <uuid>
ankk-threads listening posts --query launch
ankk-threads analytics collect-account \
--account-id <uuid> \
--from 2026-07-01T00:00:00Z \
--to 2026-07-08T00:00:00Z \
--timezone Asia/Seoul
ankk-threads analytics posts --account-id <uuid>

Use --json for automation. The CLI remains a thin client: validation, ownership, idempotency, publishing, and canonical status are controlled by the API and domain services.

Manage signed customer webhooks:

Terminal window
ankk-threads webhooks list
ankk-threads webhooks create \
--name production \
--url https://example.com/webhooks/ankk \
--event threads.publish.succeeded threads.publish.failed
ankk-threads webhooks deliveries --json