Commands › Avatars & friends
list_friends
The bot's friends list
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "list_friends",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
None besides authentication.
Returns
| Field | Type | Description |
|---|---|---|
friends[].TheirRights | object | What the friend may do with the bot. |
friends[].MyRights | object | What the bot may do with the friend. |
Example response
{
"result": "OK",
"friends": [
{
"Slname": "Jane Resident",
"Uuid": "a2e76fcd-9360-4f6d-a924-000000000000",
"Online": true,
"TheirRights": {
"CanSeeOnMap": false,
"CanSeeOnline": true,
"CanModifyObjects": false
},
"MyRights": {
"CanSeeOnMap": true,
"CanSeeOnline": true,
"CanModifyObjects": false
}
}
]
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.
Good to know
- Field names are capitalised (Slname, Uuid, Online). Slname can be empty if the name lookup timed out.