videosdk-live / videosdk.live

High Scalable WebRTC infrastructure SDKs in JavaScipt, React, Flutter, React native, Android, IOS. Official community support repository for Video SDK.
https://www.videosdk.live/
28 stars 2 forks source link

Room not found while validating it #11

Closed Elmzelji closed 1 year ago

Elmzelji commented 1 year ago

Hi So i'm generating a meeting room on the backend, When trying to validate the room id i get room not found.

export const validateMeeting = async ({ roomId, token }) => {
  const url = `${API_BASE_URL}/v2/rooms/validate/${roomId}`;

  const options = {
    method: "GET",
    headers: { Authorization: token, "Content-Type": "application/json" },
  };

  const result = await fetch(url, options)
    .then((response) => {
      if(response.ok) response.json()
    }) //result will have meeting id
    .catch((error) => console.error("error", error));

  return result ? result.roomId === roomId : false;
};
Elmzelji commented 1 year ago

Reached out via discord