Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xmistt/rebootpy/llms.txt

Use this file to discover all available pages before exploring further.

User

Represents a Fortnite user.

Attributes

client
BasicClient
The client instance.
id
str
The user’s account ID.
display_name
Optional[str]
The user’s display name. Defaults to Epic Games account name, or external auth display name if no Epic account.
May be None if fetch_user_data_in_events is disabled.
external_auths
List[ExternalAuth]
List of external authentication connections (e.g., Xbox, PlayStation). May be empty.
epicgames_account
bool
Whether the user has an Epic Games account (not just an external platform account).
May be False even for Epic accounts if fetch_user_data_in_events is disabled.
jid
str
The user’s XMPP JID (Jabber ID) for messaging.
disabled
bool
Whether the account is disabled (cannot login). Other attributes may not work if True.

Methods

fetch

await user.fetch()
Fetches and updates the user’s basic information (e.g., display name). Raises:
  • HTTPException - Request error

fetch_br_stats

await user.fetch_br_stats(
    start_time: Optional[DatetimeOrTimestamp] = None,
    end_time: Optional[DatetimeOrTimestamp] = None
) -> StatsV2
Fetches the user’s Battle Royale stats.
start_time
Optional[Union[int, datetime]]
UTC start time (epoch seconds, datetime, or Season.start_timestamp).
end_time
Optional[Union[int, datetime]]
UTC end time (epoch seconds, datetime, or Season.end_timestamp).
return
StatsV2
Stats object for the user.
Raises:
  • Forbidden - User has hidden stats in privacy settings
  • HTTPException - Request error

fetch_ranked_stats

await user.fetch_ranked_stats(
    season: Optional[Season] = None
) -> List[CompetitiveRank]
Fetches the user’s ranked stats. Works even if stats are set to private.
season
Optional[Season]
The season to get ranks for. Defaults to current season.
return
List[CompetitiveRank]
List of ranks for all game modes in the season.
Example:
user = await client.fetch_user('6v.')
ranks = await user.fetch_ranked_stats(season=rebootpy.Season.C5S3)

for rank in ranks:
    print(f'{rank.ranking_type.name} - {rank.current_division.name}')
# Output:
# BATTLE_ROYALE - DIAMOND_2
# ROCKET_RACING - UNRANKED
# ZERO_BUILD - UNREAL
Raises:
  • HTTPException - Request error

fetch_br_stats_collection

await user.fetch_br_stats_collection(
    collection: StatsCollectionType,
    start_time: Optional[DatetimeOrTimestamp] = None,
    end_time: Optional[DatetimeOrTimestamp] = None
) -> StatsCollection
Fetches a predefined stats collection.
collection
StatsCollectionType
required
The predefined stats collection to fetch.
start_time
Optional[Union[int, datetime]]
UTC start time.
end_time
Optional[Union[int, datetime]]
UTC end time.
return
StatsCollection
The stats collection.
Raises:
  • Forbidden - User has hidden stats
  • HTTPException - Request error

fetch_battlepass_level

await user.fetch_battlepass_level(
    season: Season,
    start_time: Optional[DatetimeOrTimestamp] = None,
    end_time: Optional[DatetimeOrTimestamp] = None
) -> float
Fetches the user’s Battle Pass level.
season
Season
required
The season to get the Battle Pass level for.
start_time
Optional[Union[int, datetime]]
UTC start time.
end_time
Optional[Union[int, datetime]]
UTC end time.
return
Optional[float]
Battle Pass level with decimal progress. None if no matches played.Example: 208.63 = Level 208, 63% progress to 209.
Raises:
  • HTTPException - Request error

fetch_event_tokens

await user.fetch_event_tokens() -> List[str]
Fetches the user’s event tokens.
return
List[str]
List of event token strings.
Raises:
  • HTTPException - Request error

fetch_flag

await user.fetch_flag() -> Optional[Country]
Fetches the user’s flag (country).
return
Optional[Country]
The user’s country flag enum, or None if not set.
Raises:
  • HTTPException - Request error

block

await user.block()
Blocks this user. Raises:
  • HTTPException - Request error

add

await user.add()
Sends a friend request to this user, or accepts their pending request. Raises:
  • NotFound - User does not exist
  • DuplicateFriendship - Already friends
  • FriendshipRequestAlreadySent - Request already pending
  • MaxFriendshipsExceeded - Client hit friendship limit
  • InviteeMaxFriendshipsExceeded - User hit friendship limit
  • InviteeMaxFriendshipRequestsExceeded - User hit request limit
  • Forbidden - Cannot send request due to user settings
  • HTTPException - Request error

ClientUser

Represents the client’s own user account. Extends User with additional account information.

Additional Attributes

age_group
str
The age group of the user.
can_update_display_name
bool
Whether the user can update their display name.
country
str
The country the user was registered in.
email
Optional[str]
The user’s email address. None for headless accounts.
failed_login_attempts
int
Number of failed login attempts.
headless
bool
Whether the account is headless (no Epic Games account linked).
last_login
Optional[datetime]
UTC timestamp of last login. None if never logged in.
name
Optional[str]
First name. None for headless accounts.
first_name
Optional[str]
Alias for name.
last_name
Optional[str]
Last name. None for headless accounts.
full_name
Optional[str]
Full name (first + last). None for headless accounts.
number_of_display_name_changes
int
Number of times display name has been changed.
preferred_language
str
User’s preferred language.
tfa_enabled
bool
Whether two-factor authentication is enabled.
email_verified
bool
Whether the email has been verified.
minor_verified
bool
Whether the account has been verified as run by a minor.
minor_expected
bool
Whether the account is expected to be run by a minor.
minor_status
str
The minor status of the account.

Additional Properties

jid
str
The full JID including resource part (from XMPP client).

BlockedUser

Represents a blocked user. Extends User.

Methods

unblock

await blocked_user.unblock()
Unblocks this user. Raises:
  • HTTPException - Request error

UserSearchEntry

Represents a user entry from a user search. Extends User.

Additional Attributes

matches
List[Tuple[str, UserSearchPlatform]]
List of (display_name, platform) tuples that matched the search.Example: [('Tfue', UserSearchPlatform.EPIC_GAMES)]
match_type
UserSearchMatchType
The type of match (exact, prefix, etc.).
mutual_friend_count
int
Number of Epic Games mutual friends with the client.

SacSearchEntryUser

Represents a user from a Support-A-Creator code search. Extends User.

Additional Attributes

slug
str
The creator code (slug) that matched.
active
bool
Whether the creator code is currently active.
verified
bool
Whether the creator code is verified.

ExternalAuth

Represents an external authentication connection (e.g., Xbox, PlayStation).

Attributes

client
BasicClient
The client instance.
type
str
The platform type (e.g., “xbl”, “psn”).
id
str
The user’s Fortnite account ID.
external_id
Optional[str]
The user’s ID on the external platform. May be None.
external_display_name
Optional[str]
The user’s display name on the external platform. May be None.
extra_info
Dict[str, Any]
Additional information from the API. Usually empty except for ClientUser.

Example Usage

Fetching and Using User Data

import rebootpy

client = rebootpy.BasicClient(
    auth=rebootpy.DeviceAuth(...)
)

@client.event
async def event_ready():
    # Fetch user
    user = await client.fetch_user('Ninja')
    
    if user:
        print(f'Display Name: {user.display_name}')
        print(f'ID: {user.id}')
        print(f'Epic Account: {user.epicgames_account}')
        
        # Fetch stats
        try:
            stats = await user.fetch_br_stats()
            print(f'Stats: {stats.get_stats()}')
        except rebootpy.Forbidden:
            print('User has hidden stats')
        
        # Fetch ranked stats (works even with private stats)
        ranks = await user.fetch_ranked_stats(
            season=rebootpy.Season.C5S3
        )
        for rank in ranks:
            print(f'{rank.ranking_type.name}: {rank.current_division.name}')
        
        # Check external auths
        for auth in user.external_auths:
            print(f'{auth.type}: {auth.external_display_name}')
    
    await client.close()

client.run()

Working with ClientUser

@client.event
async def event_ready():
    # Access client user info
    print(f'Logged in as: {client.user.display_name}')
    print(f'Email: {client.user.email}')
    print(f'Country: {client.user.country}')
    print(f'2FA Enabled: {client.user.tfa_enabled}')
    print(f'Headless: {client.user.headless}')

Blocking Users

# Block a user
user = await client.fetch_user('ToxicPlayer123')
if user:
    await user.block()
    print(f'Blocked {user.display_name}')

# Unblock a user
for blocked in client.blocked_users:
    if blocked.display_name == 'ToxicPlayer123':
        await blocked.unblock()
        print(f'Unblocked {blocked.display_name}')

Build docs developers (and LLMs) love