Commands › Avatars & friends
key2name
Find an avatar's name from their UUID
If the UUID cannot be looked up, the response is still result "OK", with name set to an empty string. Treat an empty name as "not found" and try again later.
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "key2name",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"key": "a2e76fcd-9360-4f6d-a924-000000000000",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
| Name | Required | Description |
|---|---|---|
keyUUID | yes | Avatar UUID. Also accepted as: target, slkey |
request_caseflag | no | 1 to keep the original capitalisation. |
Returns
| Field | Type | Description |
|---|---|---|
name | string | The avatar's username, or "" if the UUID could not be looked up. |
Example response
{
"result": "OK",
"key": "a2e76fcd-9360-4f6d-a924-000000000000",
"name": "jane resident"
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.