# listgroups

Returns a list of all Second Life groups that the bot is a member of. (For another avatar’s groups, use the [avatar_groups](/doc/8a79b7d7-5212-42fe-a950-05e69fa09d33) command.)

```csharp
// See "LSL Helper Functions" page for this function
smartbotsAPI("listgroups", []);
```

```snippet http-api-variables-OmJyUigTgO
```

```snippet http-api-input-basic-parameters-5FcVlaJbq0 action="listgroups"
```

```snippet http-api-output-JAwUcmg7i7
groups | List of group UUIDs and names, separated by a newline (`\n`)
```

# Example

The command returns the list of groups the bot belongs to.

**Raw response (URL-encoded):**

```
groups=d175f82a-2e8a-bcd2-af0b-8012d0678f2d%3BGems%20%26%20Kisses%0A040f0cd7-254e-582c-8ef7-bc9057d6834e%3BI%20Love%20Full%20Moon%0A5a4a72f5-ba47-4dbb-48d3-ebd030148ba2%3BIllusionz%20Nightclub
```

**After URL-decoding:**

```
d175f82a-2e8a-bcd2-af0b-8012d0678f2d;Gems & Kisses

040f0cd7-254e-582c-8ef7-bc9057d6834e;I Love Full Moon

5a4a72f5-ba47-4dbb-48d3-ebd030148ba2;Illusionz Nightclub
```

Each line contains:

```
<Group UUID> ; <Group Name>
```

# Notes

* Use this command to retrieve the **group membership list** of the bot.
* To obtain **detailed group info** (permissions, fees, open enrollment, etc.), use [listgroups_extended](/doc/abd4b582-1aa1-4093-a2ac-29ddb3de4dda).