# llGetExperienceDetails

*LSL function (requires an experience)*

```lsl
list list llGetExperienceDetails(key experience_id);
```

- `key experience_id`: UUID of the experience to query (can be NULL_KEY to retrieve details for the script's own experience).

- Returns: `list`
- Energy: 10

If **experience_id** is [NULL_KEY](/constants/NULL_KEY/), then information about the script's experience is returned. In this situation, if the script isn't associated with an experience, an empty list is returned.

Returns a [list](https://wiki.secondlife.com/wiki/list) of details about the experience. This list has 6 components: `[string experience_name, key owner_id, key experience_id, integer state, string state_message, key group_id]`

```lsl title="How to use" frame="terminal"
list result = llGetExperienceDetails(NULL_KEY);
```

## Examples

<details open>
<summary>Example 1</summary>

```lsl
default
   {
       touch_start(integer total_number)
       {
           key xp = "9170c22b-f445-ea5d-89fa-0f2f1e144f04";
           llOwnerSay(llDumpList2String(llGetExperienceDetails(xp), "\n"));
           // Prints:
           // Linden Realms
           // id
           // status msg

           llOwnerSay(llDumpList2String(llGetExperienceDetails(NULL_KEY), "\n"));
           // Print nothing if not associated with an XP or info about the associated experience
       }
   }
```

</details>

## History

- [BUG-7048](https://jira.secondlife.com/browse/BUG-7048) - [llGetExperienceDetails](/functions/llGetExperienceDetails/) returns 4 for `state` and "operation not permitted" for `state_message` while over mainland parcels that have the experience allowed.

## See also

### Functions

- [llAgentInExperience](/functions/llAgentInExperience/)

---

*Source: [LlGetExperienceDetails](https://wiki.secondlife.com/wiki/LlGetExperienceDetails) on the Second Life Wiki. Content from the Second Life Wiki articles LlGetExperienceDetails (revision 1199813, 2016-04-03) and Template:LSL Function/Experience (revision 1210521, 2022-03-11), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llGetExperienceDetails/
