# Session events

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

Session events apply to Meetings, Webinars, and Video SDK implementations. They provide real-time notifications about session activity, participants, media state changes, and in-meeting interactions.

> To use session events, you must first establish connections using [Universal events](/docs/rtms/event-reference/universal-events/). Subscribe to specific session events using the `EVENT_SUBSCRIPTION` message documented in the universal events reference.

## First timestamp from the signaling connection

<span className="pill_signaling">Sent from the signaling connection</span>

After the signaling connection connects, it sends a message to the app with the first timestamp. Use this timestamp as the start of the session. This message does not require a response from the app.

```json
{
    "msg_type": 6,
    "event": {
        "event_type": 1,
        "timestamp": 1727384349123
    }
}
```

| Field        | Type                                          | Description                                                                                                                                                                                        |
| ------------ | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_type`   | <span class="prop-int">int</span>             | The signaling connection sends this message to the app to provide the first timestamp for the connection. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type` | <span class="prop-int">int</span>             | The first timestamp event. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                                                                    |
| `timestamp`  | <span class="prop-ulong">unsigned long</span> | The Unix timestamp sent by the signaling connection.                                                                                                                                               |

## Active speaker change

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends active speaker change events that provide timestamps for when a user is the primary participant speaking (green box around their tile in the session). This message does not require a response from the app.

```json
{
    "msg_type": 6,
    "event": {
        "event_type": 2,
        "timestamp": 1727384349123,
        "user_id": 22334455,
        "user_name": "John Smith"
    }
}
```

| Field        | Type                                           | Description                                                                                                                                                                      |
| ------------ | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_type`   | <span class="prop-int">int</span>              | The signaling connection sends this message to the app when the active speaker changes. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type` | <span class="prop-int">int</span>              | The active speaker changed event. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                                           |
| `timestamp`  | <span class="prop-ulong">unsigned long</span>  | The Unix timestamp of the event.                                                                                                                                                 |
| `user_id`    | <span class="prop-ulong">unsigned int32</span> | The current active speaker's unique identifier.                                                                                                                                  |
| `user_name`  | <span class="prop-string">string</span>        | The current active speaker's username.                                                                                                                                           |

## Participant joined

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends participant join events when someone joins the session. This message does not require a response from the app.

```json
{
  "msg_type": 6,
  "event": {
    "event_type": 3,
    "timestamp": 1727384349123,
    "participants": [
      {
        "user_id": xxxxxxxxxx,
        "user_name": "John Smith"
      },
      {
        "user_id": xxxxxxxxxx,
        "user_name": "Alice"
      }
    ]
  }
}
```

| Field          | Type                                          | Description                                                                                                                                                                         |
| -------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_type`     | <span class="prop-int">int</span>             | The signaling connection sends this message to the app when a participant joins a session. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type`   | <span class="prop-int">int</span>             | A participant has joined the session event. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                                    |
| `timestamp`    | <span class="prop-ulong">unsigned long</span> | The Unix timestamp of when a participant joined.                                                                                                                                    |
| `participants` | <span class="prop-array">array</span>         | The participants in the session.                                                                                                                                                    |
| `user_id`      | <span class="prop-ulong">unsigned long</span> | The unique identifier of the participant that joined.                                                                                                                               |
| `user_name`    | <span class="prop-string">string</span>       | The username of the participant that joined.                                                                                                                                        |

## Participant leave

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends participant leave events when a user leaves a session, including when it ends. This message does not require a response from the app.

```json
{
  "msg_type": 6,
  "event": {
    "event_type": 4,
    "timestamp": 1727384349123,
    "participants": [
      {
        "user_id": xxxxxxxxxx
      },
      {
        "user_id": xxxxxxxxxx
      }
    ]
  }
}
```

| Field          | Type                                           | Description                                                                                                                                                                            |
| -------------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_type`     | <span class="prop-int">int</span>              | The signaling connection sends this message to the app when the participant leaves a session. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type`   | <span class="prop-int">int</span>              | The participant has left the session event. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                                       |
| `timestamp`    | <span class="prop-ulong">unsigned long</span>  | The Unix timestamp of when the participant left.                                                                                                                                       |
| `participants` | <span class="prop-array">array</span>          | The participants that left the session.                                                                                                                                                |
| `user_id`      | <span class="prop-ulong">unsigned int32</span> | The unique identifier of the participants who have left the session.                                                                                                                   |

## Sharing started

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends sharing started events when a user starts sharing their screen if the app has the `DESKSHARE` scope. This message does not require a response from the app.

```json
{
    "msg_type": 6,
    "event": {
        "event_type": 5,
        "timestamp": 1727384349123,
        "user_id": 1234234567890,
        "user_name": "John Smith"
    }
}
```

| Field        | Type                                           | Description                                                                                                                                                                          |
| ------------ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `msg_type`   | <span class="prop-int">int</span>              | The signaling connection sends this message when a participant starts sharing their screen. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type` | <span class="prop-int">int</span>              | A participant starts sharing their screen. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                                      |
| `timestamp`  | <span class="prop-ulong">unsigned long</span>  | The Unix timestamp when screen sharing started.                                                                                                                                      |
| `user_id`    | <span class="prop-ulong">unsigned int32</span> | The unique identifier of the participant that started sharing.                                                                                                                       |
| `user_name`  | <span class="prop-string">string</span>        | The username of the participant that started screen sharing.                                                                                                                         |

## Sharing stopped

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends sharing stopped events when a user stops sharing their screen if the app has the `DESKSHARE` scope. This message does not require a response from the app.

```json
{
    "msg_type": 6,
    "event": {
        "event_type": 6,
        "timestamp": 1727384349123
    }
}
```

| Field        | Type                                          | Description                                                                                                                                                                         |
| ------------ | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_type`   | <span class="prop-int">int</span>             | The signaling connection sends this message when a participant stops sharing their screen. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type` | <span class="prop-int">int</span>             | The signaling connection sends this message when screen sharing stops. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                         |
| `timestamp`  | <span class="prop-ulong">unsigned long</span> | The Unix timestamp when screen sharing stopped.                                                                                                                                     |

## Participant video on

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends a participant video on event when a participant enables their camera and is actively streaming video. Use the `user_id` in this event to send a [video subscription request](#video-subscription-request). This message does not require a response from the app.

```json
{
    "msg_type": 6,
    "event": {
        "event_type": 8,
        "timestamp": 1727384349123,
        "participants": [
            {
                "user_id": 16778240
            },
            {
                "user_id": 33556610
            }
        ]
    }
}
```

| Field          | Type                                           | Description                                                                                                                                                                    |
| -------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `msg_type`     | <span class="prop-int">int</span>              | The signaling connection sends this message when a participant turns their camera on. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type`   | <span class="prop-int">int</span>              | A participant's camera is turned on. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                                      |
| `timestamp`    | <span class="prop-ulong">unsigned long</span>  | The Unix timestamp of the event.                                                                                                                                               |
| `participants` | <span class="prop-array">array</span>          | List of participants who turned their camera on.                                                                                                                               |
| `user_id`      | <span class="prop-ulong">unsigned int32</span> | The unique identifier of the participant in the session.                                                                                                                       |

## Participant video off

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends a participant video off event when a participant turns off their camera. No video stream is being sent from that participant. This message does not require a response from the app.

```json
{
    "msg_type": 6,
    "event": {
        "event_type": 9,
        "timestamp": 1727384349123,
        "participants": [
            {
                "user_id": 16778240
            }
        ]
    }
}
```

| Field          | Type                                           | Description                                                                                                                                                                     |
| -------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_type`     | <span class="prop-int">int</span>              | The signaling connection sends this message when a participant turns their camera off. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type`   | <span class="prop-int">int</span>              | A participant's camera is turned off. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                                      |
| `timestamp`    | <span class="prop-ulong">unsigned long</span>  | The Unix timestamp of the event.                                                                                                                                                |
| `participants` | <span class="prop-array">array</span>          | List of participants who turned their camera off.                                                                                                                               |
| `user_id`      | <span class="prop-ulong">unsigned int32</span> | The unique identifier of the participant in the session.                                                                                                                        |

## Chat group created

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends a chat group created event when a new private chat group is created in the session. Subscribe to this event with `event_type: 10`. This message does not require a response from the app.

```json
{
    "msg_type": 6,
    "event": {
        "event_type": 10,
        "timestamp": 1727384349123,
        "chat_groups": [
            {
                "chat_group_id": "4105C0A2-76F0-8515-22AC-FD585C25AB82",
                "chat_group_name": "Chat Group",
                "chat_group_type": 0,
                "creator_user_id": 16778240,
                "members": [
                    {
                        "user_id": 16778240,
                        "user_name": "John Smith"
                    }
                ]
            }
        ]
    }
}
```

| Field                 | Type                                           | Description                                                                                                                                                                |
| --------------------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_type`            | <span class="prop-int">int</span>              | The signaling connection sends this message when a private chat group is created. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type`          | <span class="prop-int">int</span>              | A new private chat group was created. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                                 |
| `timestamp`           | <span class="prop-ulong">unsigned long</span>  | The Unix timestamp of the event.                                                                                                                                           |
| `chat_groups`         | <span class="prop-array">array</span>          | The private chat groups that were created.                                                                                                                                 |
| `chat_group_id`       | <span class="prop-string">string</span>        | The unique identifier of the private chat group.                                                                                                                           |
| `chat_group_name`     | <span class="prop-string">string</span>        | The name of the private chat group.                                                                                                                                        |
| `chat_group_type`     | <span class="prop-int">int</span>              | The type of private chat group. For more information, see [RTMS_CHAT_GROUP_TYPE](/docs/rtms/data-types/#rtms_chat_group_type).                                             |
| `creator_user_id`     | <span class="prop-ulong">unsigned int32</span> | The unique identifier of the participant who created the chat group.                                                                                                       |
| `members`             | <span class="prop-array">array</span>          | The members of the chat group.                                                                                                                                             |
| `members[].user_id`   | <span class="prop-ulong">unsigned int32</span> | The unique identifier of a chat group member.                                                                                                                              |
| `members[].user_name` | <span class="prop-string">string</span>        | The username of a chat group member.                                                                                                                                       |

## Chat group deleted

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends a chat group deleted event when one or more private chat groups are deleted from the session. Subscribe to this event with `event_type: 11`. This message does not require a response from the app.

```json
{
    "msg_type": 6,
    "event": {
        "event_type": 11,
        "timestamp": 1727384349123,
        "chat_groups": [
            {
                "chat_group_id": "4105C0A2-76F0-8515-22AC-FD585C25AB82",
                "chat_group_name": "Chat Group",
                "chat_group_type": 0,
                "creator_user_id": 16778240,
                "members": [
                    {
                        "user_id": 16778240,
                        "user_name": "John Smith"
                    }
                ]
            }
        ]
    }
}
```

| Field                 | Type                                           | Description                                                                                                                                                                            |
| --------------------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_type`            | <span class="prop-int">int</span>              | The signaling connection sends this message when one or more private chat groups are deleted. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type`          | <span class="prop-int">int</span>              | One or more private chat groups were deleted. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                                     |
| `timestamp`           | <span class="prop-ulong">unsigned long</span>  | The Unix timestamp of the event.                                                                                                                                                       |
| `chat_groups`         | <span class="prop-array">array</span>          | The private chat groups that were deleted.                                                                                                                                             |
| `chat_group_id`       | <span class="prop-string">string</span>        | The unique identifier of the private chat group.                                                                                                                                       |
| `chat_group_name`     | <span class="prop-string">string</span>        | The name of the private chat group.                                                                                                                                                    |
| `chat_group_type`     | <span class="prop-int">int</span>              | The type of private chat group. For more information, see [RTMS_CHAT_GROUP_TYPE](/docs/rtms/data-types/#rtms_chat_group_type).                                                         |
| `creator_user_id`     | <span class="prop-ulong">unsigned int32</span> | The unique identifier of the participant who created the chat group.                                                                                                                   |
| `members`             | <span class="prop-array">array</span>          | The members of the chat group.                                                                                                                                                         |
| `members[].user_id`   | <span class="prop-ulong">unsigned int32</span> | The unique identifier of a chat group member.                                                                                                                                          |
| `members[].user_name` | <span class="prop-string">string</span>        | The username of a chat group member.                                                                                                                                                   |

## Chat group members added

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends a chat group members added event when one or more members are added to a private chat group. Subscribe to this event with `event_type: 12`. This message does not require a response from the app.

```json
{
    "msg_type": 6,
    "event": {
        "event_type": 12,
        "timestamp": 1727384349123,
        "members_update_list": [
            {
                "chat_group_id": "4FAFFE72-FF2E-4E07-3773-248326841CBE",
                "members": [
                    {
                        "user_id": 16778240,
                        "user_name": "John Smith"
                    }
                ]
            }
        ]
    }
}
```

| Field                 | Type                                           | Description                                                                                                                                                                          |
| --------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `msg_type`            | <span class="prop-int">int</span>              | The signaling connection sends this message when members are added to a private chat group. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type`          | <span class="prop-int">int</span>              | One or more members were added to a private chat group. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                         |
| `timestamp`           | <span class="prop-ulong">unsigned long</span>  | The Unix timestamp of the event.                                                                                                                                                     |
| `members_update_list` | <span class="prop-array">array</span>          | The chat groups and the members added to them.                                                                                                                                       |
| `chat_group_id`       | <span class="prop-string">string</span>        | The unique identifier of the private chat group.                                                                                                                                     |
| `members`             | <span class="prop-array">array</span>          | The members added to the chat group.                                                                                                                                                 |
| `members[].user_id`   | <span class="prop-ulong">unsigned int32</span> | The unique identifier of an added member.                                                                                                                                            |
| `members[].user_name` | <span class="prop-string">string</span>        | The username of an added member.                                                                                                                                                     |

## Chat group members removed

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends a chat group members removed event when one or more members are removed from a private chat group. Subscribe to this event with `event_type: 13`. This message does not require a response from the app.

```json
{
    "msg_type": 6,
    "event": {
        "event_type": 13,
        "timestamp": 1727384349123,
        "members_update_list": [
            {
                "chat_group_id": "4FAFFE72-FF2E-4E07-3773-248326841CBE",
                "members": [
                    {
                        "user_id": 16778240,
                        "user_name": "John Smith"
                    }
                ]
            }
        ]
    }
}
```

| Field                 | Type                                           | Description                                                                                                                                                                              |
| --------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_type`            | <span class="prop-int">int</span>              | The signaling connection sends this message when members are removed from a private chat group. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type`          | <span class="prop-int">int</span>              | One or more members were removed from a private chat group. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                         |
| `timestamp`           | <span class="prop-ulong">unsigned long</span>  | The Unix timestamp of the event.                                                                                                                                                         |
| `members_update_list` | <span class="prop-array">array</span>          | The chat groups and the members removed from them.                                                                                                                                       |
| `chat_group_id`       | <span class="prop-string">string</span>        | The unique identifier of the private chat group.                                                                                                                                         |
| `members`             | <span class="prop-array">array</span>          | The members removed from the chat group.                                                                                                                                                 |
| `members[].user_id`   | <span class="prop-ulong">unsigned int32</span> | The unique identifier of a removed member.                                                                                                                                               |
| `members[].user_name` | <span class="prop-string">string</span>        | The username of a removed member.                                                                                                                                                        |

## Chat group member status updated

<span className="pill_signaling">Sent from the signaling connection</span>

The signaling connection sends a chat group member status updated event when the in-meeting status of a private chat group member changes. Subscribe to this event with `event_type: 14`. This message does not require a response from the app.

```json
{
    "msg_type": 6,
    "event": {
        "event_type": 14,
        "timestamp": 1727384349123,
        "member_status_update_list": [
            {
                "chat_group_id": "4FAFFE72-FF2E-4E07-3773-248326841CBE",
                "user_id": 16778240,
                "user_name": "John Smith",
                "member_status": 1
            }
        ]
    }
}
```

| Field                       | Type                                           | Description                                                                                                                                                                             |
| --------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_type`                  | <span class="prop-int">int</span>              | The signaling connection sends this message when a private chat group member's status changes. For more information, see [RTMS_MESSAGE_TYPE](/docs/rtms/data-types/#rtms_message_type). |
| `event_type`                | <span class="prop-int">int</span>              | The in-meeting status of a private chat group member changed. For more information, see [RTMS_EVENT_TYPE](/docs/rtms/data-types/#rtms_event_type).                                      |
| `timestamp`                 | <span class="prop-ulong">unsigned long</span>  | The Unix timestamp of the event.                                                                                                                                                        |
| `member_status_update_list` | <span class="prop-array">array</span>          | The chat group members whose status changed.                                                                                                                                            |
| `chat_group_id`             | <span class="prop-string">string</span>        | The unique identifier of the private chat group.                                                                                                                                        |
| `user_id`                   | <span class="prop-ulong">unsigned int32</span> | The unique identifier of the member whose status changed.                                                                                                                               |
| `user_name`                 | <span class="prop-string">string</span>        | The username of the member whose status changed.                                                                                                                                        |
| `member_status`             | <span class="prop-int">int</span>              | The updated in-meeting status of the member. For more information, see [RTMS_CHAT_GROUP_MEMBER_STATUS](/docs/rtms/data-types/#rtms_chat_group_member_status).                           |
