Getting events for a room

Getting Event for a room

GET https://{{tekos_homeserver}}/_matrix/client/r0/rooms/{roomId}/event/{eventId}

Get a single event based on roomId/eventId. You must have permission to retrieve this event e.g. by being a member in the room for this event.

Path Parameters

NameTypeDescription

eventId

string

The event ID to get.

roomId

string

The ID of the room the event is in.

tekos_homeserver

string

Your home server address, the default one is m.tekos.co, but we suggest to use env.get('BASE_URL') this variable should contain address to your home server stored on our S3 server.

Query Parameters

NameTypeDescription

access_token

string

Access Token of the user or bot that will send a message.

Request Body

NameTypeDescription

msg.payload

object

See the Events avalible for the body.

{
  "content": {
    "body": "This is an example text message",
    "msgtype": "m.text",
    "format": "org.matrix.custom.html",
    "formatted_body": "<b>This is an example text message</b>"
  },
  "type": "m.room.message",
  "event_id": "$143273582443PhrSn:example.org",
  "room_id": "!636q39766251:matrix.org",
  "sender": "@example:example.org",
  "origin_server_ts": 1432735824653,
  "unsigned": {
    "age": 1234
  }
}

Response format:

Event

Parameter

Type

Description

content

object

Required. The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body.

type

string

Required. The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'

Example request:

GET /_matrix/client/r0/rooms/%21636q39766251%3Amatrix.org/event/%24asfDuShaf7Gafaw%3Amatrix.org HTTP/1.1

Last updated