group_list_roles
Returns a list of roles within a specific group that the bot has access to.
// See "LSL Helper Functions" page for this function
smartbotsAPI("group_list_roles", [
"groupuuid", "0b65a122-8f77-64fe-5b2a-225d4c490d9c"
]);Variables
The following table shows input values (you send them with the API call) and returned output values.
Input basic parameters
Variable | Required | Description |
|---|---|---|
action | yes | = group_list_roles |
apikey | yes | Your personal developer's API key |
botname | yes | Your bot’s SL login |
secret | yes | Bot access code of your bot |
dataType | optional | Set to |
custom | optional | Custom data (string) to be passed back to caller script. Returned in the HTTP response |
Input
Variable | Required | Description |
|---|---|---|
groupuuid | yes | The UUID of the group to list roles for |
Output
(To be received in http_response LSL event — see docs for details)
Variable | Description |
|---|---|
result |
|
resulttext | Detailed reason for the failure |
custom | The value from the input |
roles | List of role UUIDs and names, separated by newline ( |
Example
Raw response (URL-encoded):
roles=044ad014-7298-eb70-0945-85d6df01f154%3BOwners%0A10d7e54f-7c52-8f0e-7ad8-7e0059664cd0%3BSmartBots%0Aaebb8d51-c3b6-74cb-cc66-9c30584b5542%3BAlive%20Bots%0Aaef5b7a6-f0c4-b847-5953-1d490f0b3485%3BSupport%20Bot%0Aeaa86b3b-1408-fb4f-3118-7dadabf65fec%3BPersonal%20bot%0A00000000-0000-0000-0000-000000000000%3BEveryoneAfter URL-decoding:
044ad014-7298-eb70-0945-85d6df01f154;Owners
10d7e54f-7c52-8f0e-7ad8-7e0059664cd0;SmartBots
aebb8d51-c3b6-74cb-cc66-9c30584b5542;Alive Bots
aef5b7a6-f0c4-b847-5953-1d490f0b3485;Support Bot
eaa86b3b-1408-fb4f-3118-7dadabf65fec;Personal bot
00000000-0000-0000-0000-000000000000;EveryoneEach line contains:
<Role UUID> ; <Role Name>Notes
Only Standard bots support this command.
Use this command to retrieve the roles and their UUIDs within a group.
Useful for commands like
activate_roleor group role management automation.