# User.SubscriptionHandler

Kind: Delegate · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0

<div class="api-meta">
<span class="api-kind api-kind-delegate" data-pagefind-filter="kind:Delegate">Delegate</span>
<span data-pagefind-filter="namespace:Sansar.Simulation">Namespace <a href="/scripting/api/sansar.simulation"><code>Sansar.Simulation</code></a></span>
</div>

<span id="T:Sansar.Simulation.User.SubscriptionHandler"></span>

Subscribe to receive events when users enter or leave the experience, or change their chat name.

```csharp
[System.Obsolete("Use subscription callbacks of type Action<Sansar.Simulation.UserData>", false)]
public delegate void User.SubscriptionHandler(
    string Action,
    Sansar.Script.SessionId User,
    string Data
)
```

| Parameter | Type | Description |
|---|---|---|
| `Action` | [string](https://learn.microsoft.com/dotnet/api/system.string) | string action of the event: AddUser, RemoveUser |
| `User` | [Sansar.Script.SessionId](/scripting/api/sansar.script/sessionid) | Sansar.Script.SessionId for the user. |
| `Data` | [string](https://learn.microsoft.com/dotnet/api/system.string) | Deprecated. |



<p class="api-generated" data-pagefind-ignore>Generated from the Sansar 47.10.0 client ScriptApi snapshot.</p>