# OnSessionClosed

This message is sent when the user’s proxy session ends.

If there is a more specific reason for the ending of the session, one of the following messages is sent instead:

[OnSessionLoggedOut](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/ProxyServiceAPI/Content/Sense_ProxyServiceAPI/ProxyServiceAPI-Msgs-Proxy-Clients-OnSessionLoggedOut.htm)

[OnSessionTimedOut](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/ProxyServiceAPI/Content/Sense_ProxyServiceAPI/ProxyServiceAPI-Msgs-Proxy-Clients-OnSessionTimedOut.htm)

Warning noteThe WebSocket is closed by the Qlik Sense Proxy Service (QPS) after this message.

```
{
  "jsonrpc":"2.0",
  "method":"OnSessionClosed",
  "params":
  {
    "severity":"fatal",
    "timestamp":"2014-01-10T10:06:35.7593714Z",
    "message":"Session closed by server"
  }
}
```