Commands › Groups
listgroups_extended
Also accepted as group_list2
Groups the bot belongs to, with details and roles
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "listgroups_extended",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"with_roles": "1",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
| Name | Required | Description |
|---|---|---|
limit_namestring | no | Only groups whose name contains this text. |
limit_uuidUUID | no | Only this group (lower-case UUID). |
with_rolesflag | no | 1 to include each group's roles. |
with_titlesflag | no | 1 to mark the bot's active title. |
Returns
| Field | Type | Description |
|---|---|---|
groups[].permissions | string | The bot's powers in the group, comma-separated. |
groups[].roles | array | Only with with_roles=1. hasRole says whether the bot holds it. |
Example response
{
"result": "OK",
"groups": [
{
"name": "My Group",
"uuid": "b3f87fed-0470-4a7e-b035-100000000000",
"fee": 0,
"open": 1,
"permissions": "Invite, Eject, AssignMember",
"acceptNotices": true,
"listInProfile": true,
"allowPublish": false,
"roles": [
{
"name": "Officers",
"uuid": "c4e98afe-1581-4b8f-a146-200000000000",
"title": "Officer",
"description": "",
"hasRole": true,
"titleSelected": false
}
]
}
]
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.
Good to know
- Slow: each group is looked up in turn, up to 5 seconds each (15 with roles). Narrow it with limit_name or limit_uuid — or use group_powers if you only need the bot's powers.