Description
I’m trying to implement ZoomSDK using ZoomMtgEmbedded on my website.
I used this and read the documentation about Component view to try it and it works fine so my signature, keys etc… are good I guess.
import axios from 'axios';
import { useEffect } from 'react';
import ZoomMtgEmbedded from "@zoomus/websdk/embedded";
export default function LiveZoom(props) {
const apiKey = process.env.REACT_APP_ZOOM_JWT_API_KEY
const meetingNumber = props.meetingNumber
const role = 0
const userName = props.username
const userEmail = props.email
const passWord = '1cVk4j'
const meetingSDKElement = document.getElementById('meetingSDKElement');
const client = ZoomMtgEmbedded.createClient();
const mySignatureEndpoint = 'MYENDPOINT'
useEffect(() => {
console.log('apiKey = '.concat(apiKey))
console.log('meetingNumber = '.concat(meetingNumber))
console.log('username = '.concat(userName))
console.log('userEmail = '.concat(userEmail))
console.log('passWord = '.concat(passWord))
getSignature()
}, []);
const getSignature = async () => {
try {
const signature = await axios.get(mySignatureEndpoint , {
params: {
'meetingNumber': meetingNumber,
'role': role,
}
}
)
initMeeting()
console.log('signature = '.concat(signature.data.signature))
joinMeeting(signature)
} catch (error) {
console.error(error)
}
};
const initMeeting = () => {
client.init({
debug: true,
zoomAppRoot: meetingSDKElement,
language: 'en-US',
customize: {
meetingInfo: ['topic', 'host', 'mn', 'pwd', 'telPwd', 'invite', 'participant', 'dc', 'enctype'],
toolbar: {
buttons: [
{
text: 'Custom Button',
className: 'CustomButton',
onClick: () => {
console.log('custom button');
}
}
]
}
}
});
}
const joinMeeting = async (signature) => {
try {
await client.join({
signature,
meetingNumber,
userName,
apiKey,
userEmail,
passWord,
success: (success) => {
console.log(success)
console.log('yeah')
},
error: (error) => {
console.log(error)
console.log('here')
}
})
} catch (error) {
console.log(error)
}
}
return (
<div className="App">
<button onClick={getSignature}>Join Meeting</button>
</div>
)
}
I didn’t forgot to insert
<div id="meetingSDKElement"></div>
in my index.html file
When I try to join the exact same meeting on my website I get an error
It throws an object with :
- errorCode: 3713
- reason: “No permission.”
- type: “JOIN_MEETING_FAILED”
I’m using the the 2.1.1 version of the zoom package.