Commands › Avatars & friends
name2key
Find an avatar's UUID from their name
If the name cannot be looked up, the response is still result "OK", with key set to 00000000-0000-0000-0000-000000000000. Treat that key as "not found".
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "name2key",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"name": "Jane Resident",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
| Name | Required | Description |
|---|---|---|
namestring | yes | "First Last", "first.last", or just "first" for Residents. Also accepted as: slname |
request_caseflag | no | 1 to look up the correctly capitalised name too. |
Returns
| Field | Type | Description |
|---|---|---|
key | UUID | The avatar UUID, or 00000000-0000-0000-0000-000000000000 if the name could not be found. |
normalname | string | The name lower-cased, or properly capitalised with request_case=1. |
Example response
{
"result": "OK",
"name": "Jane Resident",
"key": "a2e76fcd-9360-4f6d-a924-000000000000",
"normalname": "jane resident"
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.
Good to know
- Only the first page of Second Life's people search is checked, so the name must be exact.