Error 3713 : No permission

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 :

  1. errorCode: 3713
  2. reason: “No permission.”
  3. type: “JOIN_MEETING_FAILED”

I’m using the the 2.1.1 version of the zoom package.

I just solved my problem, I just forgot the header in my request with Axios lmao.

Thank you for the update, @loopers410! And glad to hear you were able to solve the problem. If possible, please post the exact solution that worked for the other community members. This will be of great help; fellow community members will benefit significantly.

With Care,
Donte

Yeah the problem was in my getSignature function, I copied fetch from the github repository (Yeah I lazily did this) But basically just don’t forget the headers: { 'Content-Type': 'application/json' } part,
:

  const getSignature = async () => {
    fetch(signatureEndpoint, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        meetingNumber,
        role
      })
    }).then(res => res.json())
      .then(response => {
        initMeeting()
        joinMeeting(response.signature)
      }).catch(error => {
        console.error(error)
      })
  }

1 Like

@loopers410,

Thank you for sharing this code snippet, along with an explanation for the resolution. You are a rockstar, and I hope everything about your day brings you joy and happiness.

With Care,
Donte

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.