Room participation

Listen on the event stream of a particular room.

This will listen for new events related to a particular room and return them to the caller. This will block until an event is received, or until the timeout is reached.

This API is the same as the normal /events endpoint, but can be called by users who have not joined the room.

Note that the normal /events endpoint has been deprecated. This API will also be deprecated at some point, but its replacement is not yet known.

get/_matrix/client/v3/events

Request

Query parameters

fromstring

The token to stream from. This token is either from a previous request to this API or from the initial sync API.

timeoutinteger

The maximum time in milliseconds to wait for an event.

room_idstring required

The room ID for which events should be returned.

Response

The events received, which may be none.

endstring

A token which correlates to the last value in chunk. This token should be used in the next request to /events.

startstring

A token which correlates to the first value in chunk. This is usually the same token supplied to from=.

Example response

{
  "chunk": [
    {
      "content": {
        "membership": "join"
      },
      "event_id": "$26RqwJMLw-yds1GAH_QxjHRC1Da9oasK0e5VLnck_45",
      "origin_server_ts": 1632489532305,
      "sender": "@example:example.org",
      "state_key": "@user:example.org",
      "type": "m.room.member",
      "unsigned": {
        "age": 1567437,
        "membership": "join",
        "redacted_because": {
          "content": {
            "reason": "spam"
          },
          "event_id": "$Nhl3rsgHMjk-DjMJANawr9HHAhLg4GcoTYrSiYYGqEE",
          "origin_server_ts": 1632491098485,
          "redacts": "$26RqwJMLw-yds1GAH_QxjHRC1Da9oasK0e5VLnck_45",
          "room_id": "!jEsUZKDJdhlrceRyVU:example.org",
          "sender": "@moderator:example.org",
          "type": "m.room.redaction",
          "unsigned": {
            "age": 1257
          }
        }
      },
      "room_id": "!jEsUZKDJdhlrceRyVU:example.org"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.