Skip to content

Get message endpoint

Alvin Cheng edited this page Apr 23, 2023 · 2 revisions

Description

This is the get message endpoint, this endpoint will return all the messages in the room provided. This endpoint will return '200' on success, '401' on an invalid API key or '500' on an internal server error. Furthermore, the source files of this endpoint are stored at /src/endpoints/getMessages.ts. And there's only one argument for this endpoint which is the 'room' argument, this argument will specify the room to search messages from, again this endpoint is quite self-explanatory.

Example

fetch("http://<URL>/api/get-messages?key=<YOUR_API_KEY>&room=<ROOM>")
  .then((res) => {
    console.log(res);
  })
  .catch((err) => {
    console.error(err);
  });
Clone this wiki locally