Tekos
  • General overview
  • Tekos Chat Workspace
    • Tekos Chat
      • Design and Interface of chat
      • Apps
    • Tekos Chat FAQ
      • How to create a workspace for my team?
      • How to invite members to my workspace?
      • What is a room and to create it?
      • Public or private room? What is the difference?
      • What is Roles & Permissions?
      • What is power level and how does it work?
      • How do I know if my message was read?
      • How can I share a file?
      • How to search messages and/or files.
      • How do I make video calls?
      • How do I change my profile settings?
      • Notifications settings.
      • Room settings.
      • How to leave a room?
      • Lab features
  • Flow Builder
    • Tekos Flow
      • Editor UI
      • Building your first flow
        • Import / Export Flow
      • Flow.tekos library
      • Subflows
  • Omnichannel Live Chat
    • Overview
    • Channels
      • WhatsApp
  • Building Apps
    • Building Apps
      • Connecting flow with the chat
      • HTTP Requests
        • Handle query parameters passed to an HTTP endpoint
        • Handle url parameters in an HTTP endpoint
    • Chat Surfaces
      • Modals - Adaptive Cards
        • Building An Adaptive Card
        • Basic usage of Cards
        • Variables in the Cards
        • Action Buttons
      • Messages
        • Instant Messaging
          • Message types
        • Getting the Messages
        • Getting events for a room
        • Messages webhook
    • Interactivity in the Chat
      • Shortcuts
      • Slash Commands
      • Buttons
Powered by GitBook
On this page
  • Getting Event for a room
  • Response format:

Was this helpful?

  1. Building Apps
  2. Chat Surfaces
  3. Messages

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

Name
Type
Description

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

Name
Type
Description

access_token

string

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

Request Body

Name
Type
Description

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
  }
}
{
  "errcode": "M_NOT_FOUND",
  "error": "Event not found."
}

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
PreviousGetting the MessagesNextMessages webhook

Last updated 4 years ago

Was this helpful?