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
-
Roblox Open Cloud Credentials Page:
https://create.roblox.com/dashboard/credentials -
Roblox Open Cloud Overview Page:
https://create.roblox.com/docs/cloud/open-cloud -
Roblox Open Cloud OAuth Page:
https://create.roblox.com/docs/cloud/open-cloud/oauth2-overview -
Roblox Open Cloud Webhooks Page:
https://create.roblox.com/docs/cloud/webhooks/webhook-notifications -
TEST PyPi Package Page
https://test.pypi.org/project/roblox-cloud-api/ -
LIVE PyPi Package Page
https://www.pypi.org/project/roblox-cloud-api/
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f79f1a242955a4f53a21016dec574be89f970ecc77266ffa1609f4f2ad7602b |
|
MD5 | b2ccdf3315c46cf80fb4ca8a4e32e56e |
|
BLAKE2b-256 | abc8dce293572b2596f8d6806399e0089e9c4307d548a707f54fedc4f744a149 |
File details
Details for the file roblox_cloud_api-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: roblox_cloud_api-0.0.10-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 817c2804cb922cb1c78b7b68597e41b8706800ddd5a5f4584354ca3d438ac6f5 |
|
MD5 | 63d5a13c530261f7ef7657dbdcf0653c |
|
BLAKE2b-256 | e22e1c0f7c472e398544b9bf7b20e34c9e0b60e237cd1f255be6141861264190 |