{type: ‘JOIN_MEETING_FAILED’, reason: ‘This account does not exist or does not belong to you’, errorCode: 200}
We’re migrating from Twilio Video to the Zoom Video SDK and are running into the error above when trying to join a session. We’ve built a Video SDK and used the SDK key and secret in our backend, we’ve taken the code from here: GitHub - zoom/videosdk-auth-endpoint-sample: Generate a Video SDK JWT to join Zoom Video SDK sessions with the Video SDK..
To connect/create a session we’re using the following code:
const getAccessToken = async () => {
const payload = {
sessionName: "sessionName123",
role: "0",
userIdentity: "userName",
sessionKey: "your_session_key",
// geoRegions: "JP",
// cloudRecordingOption: "your_cloud_recording_option",
// cloudRecordingElection: "your_cloud_recording_election",
};
try {
const response = await axios.post(
`${import.meta.env.VITE_ENDPOINT}/token`,
payload
);
return response.data;
} catch (error) {
console.error("Error fetching access token:", error);
throw error;
}
};
await getAccessToken().then((result) => {
accessToken.value = result.signature;
});
let zoomVideo = ZoomVideo.createClient();
let zoomSession;
await zoomVideo.init("jp-JA", "Global", { patchJsMedia: true });
await zoomVideo
.join(
"sessionName123",
accessToken.value,
"userName"
// "passcode" //session
)
.catch((e) => {
console.log(e);
});
zoomSession = zoomVideo.getMediaStream();