Group
rblxopencloud.Group(id, api_key)
Bases: Creator
Represents a group on Roblox. It can be used for both uploading assets, and accessing group information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
int
|
The group's ID. |
required |
api_key |
str
|
The API key created on the Creator Dashboard with access to the user. |
required |
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The group's ID. |
name |
Optional[str]
|
The group's name. |
description |
Optional[str]
|
The group's description. |
created_at |
Optional[datetime]
|
The time the group was created at. |
updated_at |
Optional[datetime]
|
The time the group was last updated. |
owner |
Optional[User]
|
The group's group's owner. |
member_count |
Optional[int]
|
The number of members in the group. |
public_entry |
Optional[bool]
|
Wether you can join without being approved. |
locked |
Optional[bool]
|
Wether the group has been locked by Roblox moderation. |
verified |
Optional[bool]
|
Wether the group has a verified badge. |
Note
All attributes above except for id
and None
by default, until Group.fetch_info
is called.
upload_asset(file, asset_type, name, description, expected_robux_price=0)
Uploads the file requested file onto roblox as an asset with the provided name and description. The following asset types and file formats are accepted:
Asset Type | File Formats |
---|---|
rblxopencloud.AssetType.Decal |
.png , .jpeg , .bmp , .tga |
rblxopencloud.AssetType.Audio |
.mp3 , .ogg |
rblxopencloud.AssetType.Model |
.fbx |
The asset:read
and asset:write
scopes are required for OAuth2 authorization.
Example
You can upload a file stored on your computer like this:
If the asset is from hosted from a URL on the internet, you could use this:Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
BytesIO
|
The file opened in bytes to be uploaded. |
required |
asset_type |
Union[AssetType, str]
|
The type of asset you're uploading. |
required |
name |
str
|
The name of your asset. |
required |
description |
str
|
The description of your asset. |
required |
expected_robux_price |
int
|
The amount of robux expected to upload. Fails if lower than actual price. |
0
|
Returns:
Type | Description |
---|---|
Union[Asset, PendingAsset]
|
Returns |
Raises:
Type | Description |
---|---|
InvalidAsset
|
The file is either an unsupported type, uploaded as the wrong |
ModeratedText
|
The name or description was moderated by Roblox's text filter. |
InvalidKey
|
The API key isn't valid, doesn't have access to upload assets, or is from an invalid IP address. |
RateLimited
|
You've exceeded the rate limits. |
ServiceUnavailable
|
The Roblox servers ran into an error, or are unavailable right now. |
rblx_opencloudException
|
Roblox returned an unexpected error. |
Danger
Avoid uploading assets to Roblox that you don't have full control over, such as AI generated assets or content created by unknown people. Assets uploaded that break Roblox's Terms of Services can get your account moderated.
For OAuth2 developers, it has been confirmed by Roblox staff in this DevForum post, that your app will not be punished if a malicious user uses it to upload Terms of Service violating content, and instead the authorizing user's account will be punished.
fetch_info()
Updates the empty attributes in the class with the group info.
The group:read
scope is required for OAuth2 authorization.
Returns:
Type | Description |
---|---|
Group
|
The class itself. |
Raises:
Type | Description |
---|---|
InvalidKey
|
The API key isn't valid, doesn't have access to read public group info, or is from an invalid IP address. |
NotFound
|
The group does not exist. |
RateLimited
|
You've exceeded the rate limits. |
ServiceUnavailable
|
The Roblox servers ran into an error, or are unavailable right now. |
rblx_opencloudException
|
Roblox returned an unexpected error. |
list_members(limit=None, role_id=None, user_id=None)
Interates rblxopencloud.GroupMember
for each user in the group.
The group:read
scope is required for OAuth2 authorization.
Example
The example below would iterate through every user in the group.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
limit |
Optional[int]
|
The maximum number of members to iterate. This can be |
None
|
role_id |
Optional[int]
|
If present, the api will only provide members with this role. |
None
|
user_id |
Optional[int]
|
If present, the api will only provide the member with this user ID. |
None
|
Returns:
Type | Description |
---|---|
Iterable[GroupMember]
|
An iterable of |
Raises:
Type | Description |
---|---|
InvalidKey
|
The API key isn't valid, doesn't have access to read public group info, or is from an invalid IP address. |
NotFound
|
The group does not exist. |
RateLimited
|
You've exceeded the rate limits. |
ServiceUnavailable
|
The Roblox servers ran into an error, or are unavailable right now. |
rblx_opencloudException
|
Roblox returned an unexpected error. |
update_asset(asset_id, file)
Uploads the file requested file onto roblox, replacing the existing asset. The following asset types and file formats can be updated:
Asset Type | File Formats |
---|---|
rblxopencloud.AssetType.Model |
.fbx |
The asset:read
and asset:write
scopes are required for OAuth2 authorization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
asset_id |
int
|
The ID of the asset to update. |
required |
file |
BytesIO
|
The file opened in bytes to be replace the old one. |
required |
Returns:
Type | Description |
---|---|
Union[Asset, PendingAsset]
|
Returns |
Raises:
Type | Description |
---|---|
InvalidAsset
|
The file is either an unsupported type, uploaded as the wrong |
ModeratedText
|
The name or description was moderated by Roblox's text filter. |
InvalidKey
|
The API key isn't valid, doesn't have access to upload assets, or is from an invalid IP address. |
RateLimited
|
You've exceeded the rate limits. |
ServiceUnavailable
|
The Roblox servers ran into an error, or are unavailable right now. |
rblx_opencloudException
|
Roblox returned an unexpected error. |
Danger
Avoid uploading assets to Roblox that you don't have full control over, such as AI generated assets or content created by unknown people. Assets uploaded that break Roblox's Terms of Services can get your account moderated.
For OAuth2 developers, it has been confirmed by Roblox staff in this DevForum post, that your app will not be punished if a malicious user uses it to upload Terms of Service violating content, and instead the authorizing user's account will be punished.
list_roles(limit=None)
Interates rblxopencloud.GroupRole
for each role in the group.
The group:read
scope is required for OAuth2 authorization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
limit |
Optional[int]
|
The maximum number of roles to iterate. This can be |
None
|
Returns:
Type | Description |
---|---|
Iterable[GroupRole]
|
An iterable of |
Raises:
Type | Description |
---|---|
InvalidKey
|
The API key isn't valid, doesn't have access to read public group info, or is from an invalid IP address. |
NotFound
|
The group does not exist. |
RateLimited
|
You've exceeded the rate limits. |
ServiceUnavailable
|
The Roblox servers ran into an error, or are unavailable right now. |
rblx_opencloudException
|
Roblox returned an unexpected error. |
fetch_shout()
Fetches the rblxopencloud.GroupShout
for the group.
The group:read
scope is required for OAuth2 authorization.
Returns:
Type | Description |
---|---|
GroupShout
|
The group's |
Raises:
Type | Description |
---|---|
InvalidKey
|
The API key isn't valid, doesn't have access to read public group info, or is from an invalid IP address. |
PermissionDenied
|
The user does not have the proper guest permissions to view the group's shout. |
NotFound
|
The group does not exist. |
RateLimited
|
You've exceeded the rate limits. |
ServiceUnavailable
|
The Roblox servers ran into an error, or are unavailable right now. |
rblx_opencloudException
|
Roblox returned an unexpected error. |
rblxopencloud.GroupMember
Bases: User
Represents a user inside of a group.
Warning
This class isn't designed to be created by users. It is returned by Group.list_members()
and User.list_groups()
.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The user's ID. |
role_id |
int
|
The user's role ID. |
group |
Group
|
The group this object is related to. |
joined_at |
datetime
|
The time when the user joined the group. |
updated_at |
datetime
|
The time when the user's membership was last updated (i.e. their role was changed). |
Note
This class bases rblxopencloud.User
, so all methods of it can be used from this object, such as User.list_inventory()
. They aren't documented here to save space.
rblxopencloud.GroupRole
Represents a role inside of a group.
Warning
This class isn't designed to be created by users. It is returned by Group.list_roles()
.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The role's ID. |
name |
str
|
The role's name. |
rank |
int
|
The numerical rank between 0 and 255. |
description |
Optional[str]
|
The role's description. Only present if the authorized user is the group owner. |
member_count |
Optional[int]
|
The number of group members with this role. Will always be |
permissions |
Optional[GroupRolePermissions]
|
The role's permissions. It is only present for the guest role, unless the authorizing user is the owner, or are assigned to the role. |
rblxopencloud.GroupRolePermissions
Data class that contains information about a role's permissions.
Warning
This class isn't designed to be created by users. It is an attribute of rblxopencloud.GroupRole()
.
Attributes:
Name | Type | Description |
---|---|---|
view_wall_posts |
bool
|
Allows the member to view the group's wall. |
create_wall_posts |
bool
|
Allows the member to send posts the group's wall. |
delete_wall_posts |
bool
|
Allows the member to delete other member's posts the group's wall. |
view_group_shout |
bool
|
Allows the member to view the group's current shout. |
create_group_shout |
bool
|
Allows the member to update the group's current shout. |
change_member_ranks |
bool
|
Allows the member to change lower ranked member's role. |
accept_join_requests |
bool
|
Allows the member to accept user join requests. |
exile_members |
bool
|
Allows the member to exile members from the group. |
manage_relationships |
bool
|
Allows the member to add and remove allies and enemies. |
view_audit_log |
bool
|
Allows the member to view the group's audit logs. |
spend_group_funds |
bool
|
Allows the member to spend group funds. |
advertise_group |
bool
|
Allows the member to create advertisements for the group. |
create_avatar_items |
bool
|
Allows the member to create avatar items for the group. |
manage_avatar_items |
bool
|
Allows the member to manage avatar items for the group. |
manage_experiences |
bool
|
Allows the member to create, edit, and manage the group's experiences. |
view_experience_analytics |
bool
|
Allows the member to view the analytics of the group's experiences. |
create_api_keys |
bool
|
Allows the member to create Open Cloud API keys. |
manage_api_keys |
bool
|
Allows the member to manage all Open Cloud API keys. |
rblxopencloud.GroupShout
Represents a group's shout.
Warning
This class isn't designed to be created by users. It is returned by Group.fetch_shout()
.
Attributes:
Name | Type | Description |
---|---|---|
content |
str
|
The shout's content. |
user |
User
|
The user who posted the shout. |
created_at |
datetime
|
The timestamp the shout was created. |
first_created_at |
datetime
|
The timestamp the first shout in the group was created. |