Threads automation via Barcelona (Instagram Private API). Works via pure HTTP — no browser needed. Uses IGT:2 token authentication.
Threads uses your Instagram account. No separate Threads login exists.
npx viruagent-cli login --provider threads --username <instagram_id> --password <password>export THREADS_USERNAME=<Instagram ID>
export THREADS_PASSWORD=<Instagram Password>
# INSTA_USERNAME / INSTA_PASSWORD also work as fallback
npx viruagent-cli login --provider threadsThe IGT:2 token is refreshed automatically. Re-login if session expires.
| Command | Description |
|---|---|
login |
Bloks API login, obtain IGT:2 token |
auth-status |
Check session validity |
logout |
Clear session |
| Command | Description |
|---|---|
get-profile --username <user> |
User profile (followers, bio, etc.) |
get-feed |
Your Threads feed timeline |
search --query <text> |
Search threads |
| Command | Description |
|---|---|
publish --content <text> |
Post a thread (text only) |
publish --content <text> --image-urls <url> |
Post a thread with image |
| Command | Description |
|---|---|
like --post-id <id> |
Like a thread |
comment --post-id <id> --text "..." |
Reply to a thread |
follow --username <user> |
Follow a user |
Similar to Instagram (new account basis):
| Action | Delay | Hourly | Daily |
|---|---|---|---|
| Post | 120-300s (2-5min) | 5 | 25 |
| Like | 20-40s | 15 | 500 |
| Reply | 300-420s (5-7min) | 5 | 100 |
| Follow | 60-120s | 15 | 250 |
- Auto-block on limit exceeded: Throws
hourly_limit/daily_limiterror immediately - Persistent counters: Saved per user in session file — survives process restarts
- Auto-reset: Counters reset after 1 hour / 24 hours
- Random delays: All actions use randomized delays to avoid bot detection
All commands use --provider threads.
# Login
npx viruagent-cli login --provider threads --username myid --password mypw
# Post a thread
npx viruagent-cli publish --provider threads --content "Hello Threads!"
# Post with image
npx viruagent-cli publish --provider threads --content "Check this out" --image-urls "https://example.com/image.jpg"
# Reply to a thread
npx viruagent-cli comment --provider threads --post-id 12345 --text "Great thread!"
# Like a thread
npx viruagent-cli like --provider threads --post-id 12345
# Follow a user
npx viruagent-cli follow --provider threads --username someone
# Search
npx viruagent-cli search --provider threads --query "AI tools"
# Profile
npx viruagent-cli get-profile --provider threads --username someone
# Feed
npx viruagent-cli get-feed --provider threads
# Rate limit status
npx viruagent-cli rate-limit-status --provider threads~/.viruagent-cli/sessions/threads-session.json
{
"token": "IGT:2:...",
"cookies": [ ... ],
"updatedAt": "2026-03-31T...",
"rateLimits": {
"12345678": {
"publish": { "hourly": 1, "daily": 3, "hourStart": ..., "dayStart": ... },
"like": { "hourly": 5, "daily": 20, ... },
"savedAt": "2026-03-31T..."
}
}
}All data stored locally only. No server transmission.
- Threads shares the Instagram account — actions may affect Instagram rate limits
- Barcelona User-Agent is required for all API calls
- IGT:2 token is the primary auth mechanism (not cookies)
- Image upload uses the Instagram media upload endpoint