Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

27 Commits

Repository files navigation

Unofficial Client for RocketBotRoyale Game API

Downloads

⚠️️ For Educational Use Only!

This is an unofficial Python client for the Rocket Bot Royale game API. It allows users to interact with the game API, including authenticating, retrieving account details, collecting timed bonuses, sending friend requests, and purchasing crates.

Installation

Install the package using pip:

pip install -U rbrapi

Usage

Initialization

Initialize a RocketBotRoyale instance with an email and password:

fromrbrapiimportRocketBotRoyalefromrbrapi.errorsimportAuthenticationError# Initialize with email and passwordclient=RocketBotRoyale(email="email@example.com", password="your_password")

Authentication

Authenticate with the RocketBotRoyale API using provided credentials:

Note: It auto-authenticates when RocketBotRoyale is initialized. Use this only for regenerating the session token.

try:
client.authenticate()
print("Authentication successful!")
exceptAuthenticationErrorase:
print(f"Authentication failed: {e}")

Account Details

Retrieve account details:

try:
account_details=client.account()
print(f"Account ID: {account_details.custom_id}")
print(f"Username: {account_details.user["username"]}")
print(f"Gems: {account_details.wallet["gems"]}")
print(f"Coins: {account_details.wallet["coins"]}")
exceptAuthenticationErrorase:
print(f"Authentication failed: {e}")

Collect Timed Bonus

Collect a timed bonus:

fromrbrapi.errorsimportCollectTimedBonusErrortry:
success=client.collect_timed_bonus()
ifsuccess:
print("Timed bonus collected successfully!")
else:
print("Failed to collect timed bonus.")
exceptAuthenticationErrorase:
print(f"Authentication failed: {e}")
exceptCollectTimedBonusErrorase:
print(f"Failed to collect timed bonus: {e}")

Send Friend Request

Send a friend request to another user:

fromrbrapi.errorsimportFriendRequestErrorfriend_code="c2829d50"try:
success=client.send_friend_request(friend_code)
ifsuccess:
print("Friend request sent successfully!")
else:
print("Failed to send friend request.")
exceptAuthenticationErrorase:
print(f"Authentication failed: {e}")
exceptFriendRequestErrorase:
print(f"Failed to send friend request: {e}")

Convert Friend Code to User ID

Convert a friend's code to their user ID:

fromrbrapi.errorsimportAuthenticationError, userNotExistErrorfriend_code="c2829d50"try:
user_id=client.friend_code_to_id(friend_code)
print(f"User ID: {user_id}")
exceptAuthenticationErrorase:
print(f"Authentication failed: {e}")
exceptuserNotExistErrorase:
print(f"User does not exist: {e}")

Purchase Crate

Purchase a crate (regular or elite):

fromrbrapi.errorsimportLootBoxErrortry:
crate_details=client.buy_crate(elite=False) # Set elite=True for elite crateprint("Crate purchased successfully!")
print(f"Crate details: {crate_details}")
exceptAuthenticationErrorase:
print(f"Authentication failed: {e}")
exceptLootBoxErrorase:
print(f"Failed to purchase crate: {e}")

Sign Up New User

Make a new account with the RocketBotRoyale API:

fromrbrapi.errorsimportSignUpErroremail="new_user@example.com"password="new_password"username="new_username"try:
success=RocketBotRoyale.signup(email, password, username)
ifsuccess:
print(f"User {username} signed up successfully!")
else:
print("Failed to sign up user.")
exceptSignUpErrorase:
print(f"Failed to sign up user: {e}")

About

Unofficial Python Client for Rocket Bot Royale Game API

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages