Skip to main content
OAuth scopes tell SW Combine what your application is allowed to do on a user’s behalf. When you generate an authorization URL, the scopes you include determine which endpoints you can call and which actions you can take with the resulting token. Requesting fewer scopes limits your app’s footprint and builds user trust — users see the full permission list before they authorize.

Using scope constants

The SDK exports typed constants for every scope. Using them instead of raw strings gives you IDE autocomplete, compile-time typo detection, and a single source of truth if scope names ever change:
All scope values sent to the API are lowercase strings with underscores (e.g., character_read, personal_inv_ships_all). The constants resolve to these lowercase literals automatically. The API rejects uppercase scope strings.

Scope categories

Import: import { CharacterScopes } from 'swcombine-sdk'
Import: import { MessageScopes } from 'swcombine-sdk'
Import: import { Scopes } from 'swcombine-sdk'Personal inventory scopes follow the pattern Scopes.PersonalInventory.{ENTITY}.{ACTION}. The top-level overview scope gives access to inventory summary data.
The same actions (READ, RENAME, ASSIGN, MAKEOVER, TAGS_READ, TAGS_WRITE, ALL) are available for: VEHICLES, STATIONS, CITIES, FACILITIES, ITEMS, DROIDS, MATERIALS, CREATURES. Planets have a reduced set (READ, ASSIGN, TAGS_READ, TAGS_WRITE, ALL); NPCs don’t have RENAME.
Import: import { FactionScopes } from 'swcombine-sdk'
Import: import { Scopes } from 'swcombine-sdk'Faction inventory scopes mirror the personal inventory structure under Scopes.FactionInventory:
The full set of entity types mirrors the personal inventory: SHIPS, VEHICLES, STATIONS, CITIES, FACILITIES, PLANETS, ITEMS, NPCS, DROIDS, MATERIALS, CREATURES.

Helper functions

The SDK provides four helper functions that return pre-built scope arrays for common scenarios:
The SW Combine API does not support scope inheritance. Requesting CharacterScopes.ALL (character_all) does not include CharacterScopes.READ (character_read) — you must list both explicitly if you want comprehensive access.

Common scope combinations

TypeScript type safety

The SDK exports an AllScopes type — a union of every valid scope literal — so TypeScript catches invalid scope strings at compile time: