mieszko4 / react-native-zoom-us

MIT License
126 stars 118 forks source link

Always asks for the passcode of the meeting when I try to start the meeting using the startMeeting() method #283

Closed ravi2611gupta closed 10 months ago

ravi2611gupta commented 1 year ago

It always asks for the passcode of the meeting when I try to start the meeting using the startMeeting() method and when I enter the passcode, the meeting doesn't starts and it waits for starting the meeting by host. My code is given below. I think think this is happening because of the incorrect zoomAccessToken token. can someone please tell me which zoom marketplace credentials should I use to create zoomAccessToken like JWT APP's credentials, SDK APP Credentials, or any other

` useEffect(() => { ZoomUs.initialize({ clientKey: 'JGZDvfh6Sey7Yjm7wimW9g', clientSecret: '6fZPn5r3hkX27ULRW3AjtYT3vQ0bzPtW', });

    setStatus(true);
}, []);

const startMeeting = async (id: string) => {
    try {
        const authToken = await AsyncStorage.getItem('authToken');
        const meetingData = await myAxios.get('sub-admin/meetings/meeting-data/' + id, {
            headers: {
                authToken: authToken,
            },
        });

        console.log('meeting data: ', meetingData.data);
        const displayName = 'Shiva Boss';
        const meetingNo = meetingData.data.meetingId;
        const userId = meetingData.data.hostEmail;
        const zoomAccessToken = meetingData.data.zoomAccessToken;

        const startMeetingResult = await ZoomUs.startMeeting({
            userName: displayName,
            meetingNumber: meetingNo,
            userId: userId,
            zoomAccessToken: zoomAccessToken,
        });

        console.log('Start meeting result:', startMeetingResult);
    } catch (error) {
        console.log('Start meeting error:', error);
    }
};

useEffect(() => {
    startMeeting(route.params.id);
}, [route.params.id, status]);`
mieszko4 commented 1 year ago

JWT App are deprecated on Zoom, so maybe that's the reason. So hopefully https://github.com/mieszko4/react-native-zoom-us-test/issues/67 should solve this.

mieszko4 commented 1 year ago

In my sample app the meeting starts correctly without password for me. This could happen if zoomAccessToken is invalid (I confirm that this happened to me).