Skip to content

Torn API Notes

Relevant constraints and gotchas from the Torn API as they affect FactionOps.

Version Status

EndpointVersionStatus
GET /user?selections=profilev1✅ Returns player_id, name, faction.faction_id
GET /v2/faction?selections=membersv2✅ Returns array of members (not a dict)
GET /v2/faction?selections=barsv2❌ Returns the requesting user's own bars only — does not provide individual member energy, even with a leader key
GET /v2/user?selections=bars,cooldowns,attacksv2✅ Works for own bars/attacks only (personal key required)
GET /v2/user/{other_id}?selections=barsv2❌ Error 7 — can only query your own bars

Key Constraints

Energy tracking requires personal keys. There is no way to read another member's energy bar via the Torn API, even with a faction leader key or AA access. Each member must supply their own Full Access personal API key. This is why only members who have logged into FactionOps and provided their key generate energy snapshots.

v2 members response is an array, not a dict. The v1 faction members endpoint returned an object keyed by member ID. v2 returns an array:

json
{ "members": [{ "id": 468807, "name": "smolnugget", "level": 50, ... }] }

FactionOps normalises this back to a Record<string, TornMember> map internally.

TornAttack.chain is a scalar integer. The chain field in attack records is the chain count at the time of the attack (e.g. "chain": 150). It is not a nested object.

Key tier restrictions:

Access LevelWhat It Unlocks
Publicprofile, basic selections; faction member ID
MinimalArmory news (AA gate probe), OC data, war history
LimitedContributor stats, FFScouter stat lookups
Full AccessPersonal bars, attacks, cooldowns, log entries

Battlestats modifiers are v1-only. The <stat>_modifier and <stat>_info[] fields that FactionOps uses to compute effective stats and buff/debuff breakdowns are available via the v1 battlestats endpoint. Do not expect them from v2.

Known Gotchas

selections=basic is not the AA probe. basic is a public selection — everyone passes it. The AA access probe uses armorynews, which is gated at the Minimal access level. Using basic to detect AA status will always return true and let everyone through.

Recruit-phase members report zero gym contributions. Members in their first ~3 days in the faction report contributed = 0 in the faction contributors endpoint. Their "Gym Energy Spent" in the Members table will show 0 during this period regardless of actual gym activity. Battle stats (collected via their own key) still reflect real training.

Item requirement is_available is member-scoped. The is_available flag on an OC slot's item requirement reflects whether the assigned member has the item in their inventory. It is not a general stock check and does not apply to unfilled slots.

Torn API v1 → v2 migration is ongoing. Endpoints may change behaviour or require version prefixes without notice. When in doubt, test against the live API.

FactionOps is not affiliated with Torn or Torn Ltd.