Skip to main content

Module roblox

Module roblox 

Source
Expand description

Roblox HTTP flows and strict launch-URI construction.

Structsยง

FriendResponse ๐Ÿ”’
One online friend.
FriendsEnvelope ๐Ÿ”’
The online friends API response. Only IDs are read. Other details come from the users and presence APIs.
GameCreator ๐Ÿ”’
The user or group that owns a game.
GameResponse ๐Ÿ”’
One gameโ€™s details. Fields other than id and name are only used by place search.
GamesEnvelope ๐Ÿ”’
The games API response.
OnlineFriend
A friend who is online, as the dashboard shows it.
PlaceMatch
A game found by name, with the place a join opens.
PlayerMatch
A player found by name.
PlayerResponse ๐Ÿ”’
A user from the user search and username APIs.
PlayersEnvelope ๐Ÿ”’
The username API response.
PresenceDetail
Presence plus the game an in-game account is playing. Roblox omits the place for accounts the viewing session isnโ€™t allowed to see.
PresenceEnvelope ๐Ÿ”’
The presence API response.
PresenceResponse ๐Ÿ”’
One userโ€™s presence.
Profile
A Roblox userโ€™s public profile.
Relationship
The session userโ€™s relationship to another player. Fields Roblox didnโ€™t answer are None.
SearchEnvelope ๐Ÿ”’
The game search response.
SearchGame ๐Ÿ”’
One game in the search results.
SearchGroup ๐Ÿ”’
One group of search results. Only Game groups are used.
SearchUser ๐Ÿ”’
One user in the player search results.
ThumbnailEnvelope ๐Ÿ”’
The thumbnails API response.
ThumbnailResponse ๐Ÿ”’
One avatar or game icon image.
UniverseResponse ๐Ÿ”’
The place universe API response.
UserResponse ๐Ÿ”’
A user from the users API.
UserSearchEnvelope ๐Ÿ”’
The player search response, grouped like the game search.
UserSearchGroup ๐Ÿ”’
One group of player search results. Only User groups are used.
UsersEnvelope ๐Ÿ”’
The batch users API response.

Enumsยง

FriendStatus
Where a friendship stands between the sessionโ€™s user and another player.
JoinTarget
What a join opens: a place, or the game a player is in.
RobloxError
Why a Roblox request failed. Displays as a user-facing message.
SocialAction
A change to the session userโ€™s relationship with another player.

Constantsยง

AUTH_URL ๐Ÿ”’
Returns the user a session belongs to.
BLOCKING_URL ๐Ÿ”’
Blocking, by user ID.
FOLLOWING_EXISTS_URL ๐Ÿ”’
Follow lookups for the sessionโ€™s user.
FRIENDS_LIMIT ๐Ÿ”’
Most online friends shown. Robloxโ€™s batch lookups accept about this many IDs.
FRIENDS_URL ๐Ÿ”’
Friends of a user, by ID. The online list requires that userโ€™s session.
GAMES_URL ๐Ÿ”’
Game details, by universe ID.
GAME_ICONS_URL ๐Ÿ”’
Game icon images, by universe ID.
PLACE_LAUNCHER_URL ๐Ÿ”’
Roblox place launcher, passed to the client in the launch URI.
PLACE_UNIVERSE_URL ๐Ÿ”’
The universe a place belongs to.
PLAYER_SEARCH_LIMIT ๐Ÿ”’
Most players a player search returns.
PRESENCE_URL ๐Ÿ”’
User presence. Requires a signed-in session.
SEARCH_LIMIT ๐Ÿ”’
Most games a place search returns.
SEARCH_URL ๐Ÿ”’
Game search, as used by roblox.com. Undocumented, so failures return no results.
THUMBNAIL_URL ๐Ÿ”’
Avatar headshot images.
TICKET_URL ๐Ÿ”’
Issues one-time authentication tickets for launching the Roblox client.
USERNAMES_URL ๐Ÿ”’
Exact username lookup.
USERS_URL ๐Ÿ”’
Public user profiles, by ID.

Staticsยง

TRACKER_SEQUENCE ๐Ÿ”’
Keeps browser tracker IDs distinct for joins in the same instant.

Functionsยง

apply_game_details ๐Ÿ”’
Copies visits, creator, and other details onto the matching places.
authenticated_profile
Returns the profile of the user a session belongs to, validating the session.
build_join_uri
Builds a roblox-player: URI that joins the place, or follows the player into their game, as the sessionโ€™s user.
change_relationship
Changes the session userโ€™s relationship with user_id.
clean_game_name ๐Ÿ”’
Trims a Roblox-supplied game name and caps its length for display.
clean_text ๐Ÿ”’
Trims Roblox-supplied text and caps its length. Blank text is None.
cookie_header ๐Ÿ”’
Builds the session cookie header, marked sensitive so it isnโ€™t logged.
fetch_avatars ๐Ÿ”’
Looks up avatar headshots by user ID. Failures return no avatars because theyโ€™re display-only.
fetch_game_details ๐Ÿ”’
Fetches the games API response for the matchesโ€™ universes. Failures return None.
fetch_game_icons ๐Ÿ”’
Looks up icons for the matchesโ€™ universes. Failures return no icons because theyโ€™re display-only.
fetch_game_names
Looks up game names by universe ID. Failures return no names because theyโ€™re display-only.
fetch_online_friends
Returns the online friends of the user a session belongs to, in-game friends first.
fetch_place_universe
Finds the universe for a place. Ok(None) means Roblox has no universe for that place.
fetch_presence
Returns each requested userโ€™s presence state.
fetch_presence_details
Returns each requested userโ€™s presence and game.
fetch_relationship
Returns the relationship between the sessionโ€™s user, account_id, and user_id. Only the friend status is required. Follow and block lookups that fail are None.
fetch_users ๐Ÿ”’
Looks up public profiles by ID. Roblox leaves out banned users.
join_uri ๐Ÿ”’
Formats the launch URI for a ticket and target.
merge_friends ๐Ÿ”’
Combines profiles with presence, dropping friends who have since gone offline. Friends in game come first, then the rest, each sorted by name.
parse_blocked ๐Ÿ”’
Reads the is-blocked API, which answers with a bare boolean or an isBlocked field.
parse_following ๐Ÿ”’
Reads whether the sessionโ€™s user follows user_id from the following-exists API.
parse_friend_ids ๐Ÿ”’
Reads friend IDs, dropping duplicates and keeping at most FRIENDS_LIMIT.
parse_friend_status ๐Ÿ”’
Reads one userโ€™s friend status from the friend statuses API.
parse_games_response ๐Ÿ”’
Keeps names for requested universes only.
parse_icon_response ๐Ÿ”’
Keeps https: image URLs, by universe or user ID.
parse_join_target
Reads a join target: @ and a user ID, an https://www.roblox.com/users/<id>/โ€ฆ link, or anything parse_place_id accepts.
parse_place_id
Extracts a place ID from digits or an https://www.roblox.com/games/<id>/รขโ‚ฌยฆ link.
parse_players ๐Ÿ”’
Reads players from the username lookup, then the player search, dropping duplicates, malformed bodies, and invalid IDs, and keeping at most PLAYER_SEARCH_LIMIT.
parse_presence_response ๐Ÿ”’
Maps each requested user to a presence. Users missing from the response are Unknown, and game details are kept only for users in game.
parse_search_response ๐Ÿ”’
Keeps unsponsored games with a place and a name, without repeats, up to SEARCH_LIMIT.
parse_user_id ๐Ÿ”’
A user ID: 1 to 20 ASCII digits, not zero.
profile_with_avatar ๐Ÿ”’
Adds the userโ€™s avatar headshot URL. A missing avatar isnโ€™t an error.
public_profile
Returns a userโ€™s public profile, rejecting a response for a different user.
roblox_error_reason ๐Ÿ”’
Reads the first error code and message from a Roblox error body, at most 200 characters.
search_places
Searches Roblox for games by name. Failures return no results because search is optional.
search_players
Finds players by username or display name with the search roblox.com uses, which isnโ€™t rate limited like the users API search. An exact username match comes first. Failures return no results.
search_request ๐Ÿ”’
Roblox returns no results without a sessionId. Any value works, so a fixed one keeps searches unlinkable.
send_with_session ๐Ÿ”’
Sends a request with the session to a Roblox URL, retrying once with the CSRF token Roblox returns on the first request. A verification challenge fails with Challenged.