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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file roblox_cloud_api-0.0.10.tar.gz.

File metadata

  • Download URL: roblox_cloud_api-0.0.10.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for roblox_cloud_api-0.0.10.tar.gz
Algorithm Hash digest
SHA256 0f79f1a242955a4f53a21016dec574be89f970ecc77266ffa1609f4f2ad7602b
MD5 b2ccdf3315c46cf80fb4ca8a4e32e56e
BLAKE2b-256 abc8dce293572b2596f8d6806399e0089e9c4307d548a707f54fedc4f744a149

See more details on using hashes here.

File details

Details for the file roblox_cloud_api-0.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for roblox_cloud_api-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 817c2804cb922cb1c78b7b68597e41b8706800ddd5a5f4584354ca3d438ac6f5
MD5 63d5a13c530261f7ef7657dbdcf0653c
BLAKE2b-256 e22e1c0f7c472e398544b9bf7b20e34c9e0b60e237cd1f255be6141861264190

See more details on using hashes here.

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