Self-Hosted Jitsi Meet, make a RESt call when user joins or leaves

Hi everyone,

I am new to Jitsi, but I have been able to get setup with self-hosting Jitsi Meet (along with the backend JVB, Jicofo, etc), and I am trying to figure out a way for my app server to monitor how many people are in a meeting. Ideally, this would be done with a RESt api, either my app server polls Jitsi or Jitsi calls a method when a user joins or leaves. Has anyone accomplished this in the past, or have any guidance/suggestions on how to go about it?


Open port 8080 on jvb and try curl http://localhost:8080/colibri/stats
port 8888 for jicofo and use curl http://localhost:8888/stats

If you just need to know the number of room occupants at a specific point in time, then metadata’s suggestion above would be the way to go.

If you need an actual list of participants, the only way I know (which doesn’t say much :smirk:) is to make your REST API calls from a prosody modules.

The simplest would be to add you call to the speaker_stats function in /usr/share/jitsi-meet/prosody_plugins/ext_events.lib.lua. This will get called at the end of a meeting, and
the speakerStats argument will contain details of all meeting participants.

If you need more real-time information, e.g. API calls each time user leaves or joins, you will need to write your own prosody component and hook into the muc-occupant-joined and muc-occupant-pre-leave events.

So I’ve managed to get the /colibri/conferences endpoint working, but I noticed that conferences seem to have their own ID. Is there any way I can map the name of the room to the conference id?

Managed to figure it out. Using the /debug rest api you can get a list of the rooms with the names

Nice! If you can, kindly share the steps you took. I haven’t looked into this, but seems like a nice ‘to-have’.

Hi Nathan,
I am trying implement a similar requirement to call a REST API from prosody. But the module is not getting called. Can you tell me the steps you followed to trigger the prosody module.

Appreciate your help.


Hey Jaam,

I was not actually triggering anything, just reading information. Is that what you’re trying to do?

Hi Nathan,
I want to call a rest api to clear some events when the meeting ends. I was able to find the module under prosody. Thanks



I also want to call a rest API to clear some data in DB when the meeting ends.

I tried giving my API URL in the event_sync , mod_reservations.lua and also in speaker_stats in ext_events.lib.lua . But could not trigger the API. Is there any other prosody module that I could use.
what might be the reason that my API did not trigger?

You have tried it with three different prosody modules, and we have already established several times in various posts and PM that API calls are being made successfully from the prosody modules when a different API URL is used; so the issue is your API and simply using “another prosody module” is not going the solve the problem.

The problem you are facing is very likely down to how your endpoint is set up, or how your API request is being routed.

In our last encounter, it looked like you might be calling an endpoint that relies on HTTP redirects. Did you follow up on that?

Also, please do stop asking the same question across multiple thread. Especially when you and your colleage have already opened multiple threads on the same topic and abandoned them - 1, 2, 3, 4

1 Like

Yes, we followed that . Now we are able to trigger the API endpoint URL from Prosody . We gave the API URL outside the speaker_stats function in ext_events.lib.lua . I think I had issues since I have not hooked any of the MUC components in speaker_stats function.

Now I need to get the jid to make my requirement complete.

Thanks for the support.