Skip to main content

Roblox API for open cloud and assets.

Project description

Roblox Open Cloud API in Python

Roblox Open Cloud is an addition to the roblox developer workspace that allows automation of workflows to improve the efficiency of content creation and adds support for your needs to develop games on Roblox.

Open Cloud allows you to build your own tools and applications to access your roblox resources through web apis. Open Cloud is accessed through API keys or OAuth applications, and permissions can be set on api keys and authentications to determine the accessibility level of those authenticated applications and utilized api keys.

Additionally, webhooks can also be utilized to receive real-time notifications on third-party tools or custom endpoints.

Installation

To install with pip, simply run the one of the following in a command prompt:

pip install roblox-cloud-api
pip3 install roblox-cloud-api

or if those do not work, one of the following;

py -m pip install roblox-cloud-api
python -m pip install roblox-cloud-api
py3 -m pip install roblox-cloud-api
python3 -m pip install roblox-cloud-api

covers the scenarios where the command prompt python keyword differs

You can then import the package via

import roblox_open_cloud

Usage

Use python's autocomplete to see what endpoints allow both or either USER_ACCOUNTs and API_KEYs.

Importing essentials

from roblox_open_cloud import (
	API_KEY, # api keys
	USER_ACCOUNT, # roblox accounts
	KeyAPI, # validate api keys
	UserAPI, # validate roblox accounts
	OpenCloudAPI # open cloud api
)

Utilizing API Keys

# Create an api key instance.
# Used to access resources.
api_key = API_KEY(
	api_key="", # api key credential
	creator_id="", # userId / groupId that owns the api key
)

# check if the api key is valid, only need to do once.
try:
	is_key_valid = KeyAPI.is_api_key_valid( api_key )
except Exception as e:
	print("Failed to check API_KEY validity with KeyAPI.")
	raise e # if the request itself failed, tell us why

if not is_key_valid:
	raise Exception("API Key is invalid.")

# now the key has been validated, we can do stuff with it.

# request to the MessagingService api and post a message
# raises an Exception if failed
try:
	OpenCloudAPI.MessagingService.publish_async(
		api_key, # api_key
		000000, # universe id
		"topic", # topic
		"message" # message
	)
	print("Published message using API Key!")
except Exception as e:
	print("Failed MessagingService message publish!")
	print(e)

Utilizing Roblox Accounts

# Create an api key instance.
# Used to access resources.
account = USER_ACCOUNT(
	cookie="", # cookie
	user_id="", # userId
)

# check if the account is valid, only need to do once.
try:
	is_account_valid = UserAPI.is_user_account_valid( account )
except Exception as e:
	print("Failed to check USER_ACCOUNT validity with UserAPI.")
	raise e # if the request itself failed, tell us why

if not is_account_valid:
	raise Exception(f"User Account is invalid.")

# now the user account has been validated, we can do stuff with it.

# request to the MessagingService api and post a message
# raises an Exception if failed
try:
	OpenCloudAPI.MessagingService.publish_async(
		account, # user account
		000000, # universe id
		"topic", # topic
		"message" # message
	)
	print("Published message using User Account!")
except Exception as e:
	print("Failed MessagingService message publish!")
	print(e) # tells us the reason (Exceptions are raised based on webpoint responses.)

Links

Credits

Package by SPOOK_EXE
https://github.com/SPOOKEXE
https://www.roblox.com/users/1041213550/profile

Anamius - 'rbxmk' for parsing roblox files
https://github.com/Anaminus/rbxmk

Additional Documentation

View Here (Local) View Here (GitHub)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roblox_cloud_api-0.0.10.tar.gz (12.6 kB view hashes)

Uploaded Source

Built Distribution

roblox_cloud_api-0.0.10-py3-none-any.whl (11.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page