Mapping join and leave of participants webhook events with users on our application

Description
I am trying to find a way to utilize the webhooks to determine when specific participants enter and leave a meeting created via API. We have a database of users on our application that we want to store their attendance within meetings. How can we map our users to the webhook data provided?

What is the best way to map webhook event payloads to specific unique users on our application?

Which App Type (OAuth / Chatbot / JWT / Webhook)?
Webhook & JWT
https://marketplace.zoom.us/docs/api-reference/webhook-reference/meeting-events/participant-joined-meeting
https://marketplace.zoom.us/docs/api-reference/webhook-reference/meeting-events/participant-left

Hey @edwinthinks,

You can accomplish this by mapping the id’s from the two webhooks:

Thanks,
Tommy

Hello Tommy,

Our users won’t be logged on into Zoom. Is there anyway to leverage the fields without having to require the users from logging in? Currently the webhooks generates a random ID for these users.

Thanks,
Edwin Mak

Hey @edwinthinks,

Yes, the user_id field is how you can map the users if they are not logged into Zoom.

Are you just trying to match Participant Joined with Participant Left Webhooks? If so, use the user_id in the payload.

Thanks,
Tommy

Hello Tommy,

Thanks for the reply. We are trying to match both the joined and left event with a user_id on our application. Here is our use-case:

  1. Users log into our application
  2. In our application, the users will click on a button that will redirect them to a meeting via the join_url we retrieved from creating a meeting in the API.
  3. We’ll record the webhook of them joining and exiting and match them with our own user. For example: that user’s id on our application is ‘123’ and we want to know which of the join and exit events belong to them.

Does this make sense?

Thanks again!

Hey @edwinthinks,

Thanks for sharing your use case.

You could use meeting registration to create a unique join URL for all of your users. Then you can map your users easier via the registrant_id and user_id.

Thanks,
Tommy

Hello Tommy,

I see that the registrant_id can match with the user_id in the API you linked. However, is there a way to configure the webhook to utilize that registrant_id?

Ideally, we’ll be able to track incoming events and associate them with the users.

Thanks!

1 Like

Hey @edwinthinks,

I believe the registrant_id is indeed the user_id in the participant webhooks.

Thanks,
Tommy

Hey Tommy,

I am seeing that the id is populated and matches the registrant_id in the participant.leave event. Which is great!

However, I am seeing that the participant.join does not include the id.

Join event:

Leave event:

Is this a bug?

Hey @edwinthinks,

The id will only be included if that user is logged in. Notice how the user_id matches between the two webhooks.

Thanks,
Tommy

Hey @tommy,

Thanks for the response.

Currently the registrant_id only matches the id of the leave event. As a result, I cannot tell which user or registrant is triggering a join event until the exit occurs?

Here is are my thoughts:

  1. Store the registrant_id and associate it with our internal User records.
  2. Store the join event payload.
  3. Store the leave event and match the id with the registrant_id I stored. Find the join event with the same user_id as the leave event.

Does this sound correct? And is there anyway for Zoom to send the registrant_id in the join event as the id?

Thanks!

Hey @edwinthinks,

If I am not mistaken, the id and the user_id should match for both Joined and Left webhooks.

You could also use the user_name field to match the registrants to participants.

Thanks,
Tommy

Hey @tommy,

The user_id does match but the id does not. The id is not present in the join event, because as you mentioned the user isn’t logged in. Any chance we get that id to be present for the join event?

You could also use the user_name field to match the registrants to participants.

Yep, I think we might be able to manage this too. Any chance that this could change by user inputs? That is if a user goes into the meeting and then changes their name. Will the name not match anymore between join and leave event?

Thanks

Hey @edwinthinks,

Correct, if the user is not logged in, the id will not be there.

Good question!

After testing, the name does not change in the Webhook payload:

Join:

{ duration: 0,
  start_time: '2020-02-25T20:21:30Z',
  timezone: 'America/Denver',
  topic: 'Tommy Gaessler\'s Personal Meeting Room',
  id: '3035650000',
  type: 4,
  uuid: '9KPuDeOCQfSiK8ardcw9lw==',
  participant:
   { id: '88CCc8_KQNebfLX7rvnFwQ',
     user_id: '16780288',
     user_name: 'Tommy Gaessler',
     join_time: '2020-02-25T20:22:26Z' },
  host_id: 'KdYKjnimT4KPd8KKdQt9FQ' }

Changed name to Tommy Name Changed,

{ duration: 0,
  start_time: '2020-02-25T20:21:30Z',
  timezone: 'America/Denver',
  topic: 'Tommy Gaessler\'s Personal Meeting Room',
  id: '3035650000',
  type: 4,
  uuid: '9KPuDeOCQfSiK8ardcw9lw==',
  participant:
   { leave_time: '2020-02-25T20:22:48Z',
     id: '88CCc8_KQNebfLX7rvnFwQ',
     user_id: '16780288',
     user_name: 'Tommy Gaessler' },
  host_id: 'KdYKjnimT4KPd8KKdQt9FQ' }

Note user_name stayed the same.

Thanks,
Tommy

how do i get participants to database.can you help me .

Hey @yash.sakali,

Please stop posting the same questions multiple times. I have answered you here:

Thanks,
Tommy