SW Combine SDK
    Preparing search index...

    Character resource for managing characters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    • Get character by UID.

      Returns the Character object directly — not wrapped in a Page.

      @requires_auth Yes @requires_scope CHARACTER_READ

      Parameters

      Returns Promise<Character>

      The Character entity.

      const character = await client.character.get({ uid: '1:12345' });
      console.log(character.name); // access properties directly, not character.data
    • Look up a character's UID by their handle (username).

      This endpoint is public — no authentication required — and is the primary way to resolve a handle to the uid used by every other character endpoint.

      Parameters

      Returns Promise<{ handle: string; uid: string }>

      { uid, handle } — both fields are always present

      const { uid, handle } = await client.character.getByHandle({ handle: 'Dreks Selmur' });
      console.log(uid); // "1:46931"
      console.log(handle); // "Dreks Selmur"

      // Chain into a full profile fetch (requires CHARACTER_READ)
      const character = await client.character.get({ uid });
    • Check if the API client has a specific permission for this character

      Parameters

      • options: { permission: string; uid: string }
        • permission: string

          Permission scope to check (e.g., 'CHARACTER_READ', 'MESSAGES_SEND')

        • uid: string

          Character UID

      Returns Promise<boolean>

      True if the permission is granted, false otherwise

      const canRead = await client.character.hasPermission({ uid: '1:12345', permission: 'CHARACTER_READ' });
      if (canRead) {
      const character = await client.character.get({ uid: '1:12345' });
      }
    • Get the currently authenticated user's character @requires_auth Yes @requires_scope CHARACTER_READ

      Returns Promise<CharacterMe>

      The authenticated character's full profile

      const myCharacter = await client.character.me();