Mirotalk SFU remote room control
-
Looking at the existing API endpoints for Mirotalk SFU I didn't see a way in which we could remotely end meetings. We were looking to build a video conferencing app that has billable minutes. We needed a way in which to remotely end a call if a person has used all minutes for their call. Unless I should be using some other Mirotalk product? Let me know. Thanks!
-
This is probably a question for the mirotalk upstream project. @mirotalk is sometimes around here in the forum, so maybe he sees this. I guess since you try to build a business on top of mirotalk, might be worth making contact there to see if this is somehow impacted by the license of mirotalk.
-
Looking at the existing API endpoints for Mirotalk SFU I didn't see a way in which we could remotely end meetings. We were looking to build a video conferencing app that has billable minutes. We needed a way in which to remotely end a call if a person has used all minutes for their call. Unless I should be using some other Mirotalk product? Let me know. Thanks!
For commercial use, an Extended License is required. You can purchase it directly from CodeCanyon here:
https://codecanyon.net/user/miroslavpejic85/portfolioRegarding call duration, this is supported in both MiroTalk SFU and MiroTalk P2P.
There are two ways to control room duration:
1οΈβ£ Create a room with a duration (via URL)
Pass the
durationparameter inHH:MM:SSformat (e.g.00:30:00).Docs:
- SFU Join Room API: https://docs.mirotalk.com/mirotalk-sfu/join-room/
- P2P Join Room API: https://docs.mirotalk.com/mirotalk-p2p/join-room/
2οΈβ£ Set duration via API (recommended for billing systems)
Include:
duration=HH:MM:SSExample:
00:30:00Direct Join API:
- SFU: https://docs.mirotalk.com/mirotalk-sfu/api/#direct-join-entry-point
- P2P: https://docs.mirotalk.com/mirotalk-p2p/api/#direct-join-entry-point
When the timer expires, the room closes automatically.
Also check Moderation settingsIn the room settings β Moderation, there is an option:
When presenter leaves the room β disconnect all participants
You can end the meeting for everyone that way as well.
At the moment there isnβt a dedicated endpoint to forcibly close a specific room on demand, but that makes sense for billing use cases, Iβll add it to the roadmap

-
Great news @pdurante1981 @nebulon

The
Meeting END APIhas been implemented inMiroTalk SFU v2.1.20.This allows you to remotely terminate an active meeting by room name, perfect for billable minutes or subscription-based systems.
New EndpointDELETE /api/v1/meeting/:roomWhat it does:
- Disconnects all connected peers
- Optionally redirects them to a custom URL
- Disables the βbeforeunloadβ confirmation popup when ended via API
- Protected via API secret key
- Fully documented in Swagger
- Includes example scripts (JS, Shell, Python, PHP)
- Covered by unit tests
Enable the FeatureIn your
envfile:API_KEY_SECRET=mirotalksfu_default_secret API_ALLOW_MEETING_END=trueBy default, this endpoint is disabled for security reasons.
Quick ExamplesEnd meeting (peers return to home page)
curl -X DELETE http://localhost:3010/api/v1/meeting/test \ -H "authorization: mirotalksfu_default_secret" \ -H "Content-Type: application/json"End meeting with custom redirect
curl -X DELETE http://localhost:3010/api/v1/meeting/test \ -H "authorization: mirotalksfu_default_secret" \ -H "Content-Type: application/json" \ -d '{"redirect": "https://docs.mirotalk.com/about"}'
DocumentationFull API reference:
https://docs.mirotalk.com/mirotalk-sfu/api/#meeting-end-entry-point
This should now fully cover your use case for remotely ending meetings when user minutes expire

-
Awesome! Thanks for the quick reply and implementation!