Skip to content

Report room endpoint

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

Description

This is the report room endpoint, this endpoint will report by emailing me the passed room when called. The endpoint will take a 'message' argument for the message, a 'user' argument for the user that reported the room, and a 'room' argument that specifies the room to report. Furthermore, This endpoint will return a status of '401' on invalid key, '500' on server error and '200' on success. Also, the source is stored at /src/endpoints/reportRoom.ts, I highly doubt that this endpoint will work for Gmail because of the security updates by google, more info here.

Example

post("http://<URL>/api/report-room?key=<YOUR_API_KEY>", {
  room: "<ROOM_ID>",
  message: "<MESSAGE>",
  user: "<USER>",
})
  .then((res) => {
    console.log(res);
  })
  .catch((err) => {
    console.error(err);
  });
Clone this wiki locally