Webhooks feature request (/Presence enhancement) V2

Hi Daily Team!

Let me start by saying working with your API has been a delightful experience. I made a feature request a few months back regarding server-side webbooks, but couldn't follow it up because my day job got busy.

I love that you have implemented a /presence endpoint, it is a step in the right direction, but unfortunately, polling that endpoint every 15 seconds for all of my audio rooms is not scalable on either the front end side or the back end side.

What I would Ideally like is to implement an endpoint that has the following spec:

hook endpoint: myapi.myproject.com

Received data object: (basically the exact same as the /presence response body, maybe include some more fields in the future like isCameraOn, isScreenShareOn ,isMuted for each participant in the future?).

When will Daily.co call my webhook?

Whenever a participant joins or leaves(regardless of reason), and I can overwrite the list of participants. That way it's more scalable and I can mirror my database to be the same as the participants daily.co backend.

Here is a demo(the project has already stealth launched so I'm okay with sharing it ๐Ÿ˜‰)

What you can see in the demo is a hacky solution where I detect the front-end client has left the room when the client sends an API request so I can update my DB and display to all other users that the room is empty, but what I need is for Daily to send the latest info regarding a room that a user has left, and I can update accordingly. That way, my BE and daily are fully in sync, and in real time.


Thank you!

Best Regards <3

2
2 votes

Active ยท Last Updated

Comments

  • Just to clarify, "Whenever a participant joins or leaves(regardless of reason), and I can overwrite the list of participants.ย " I meant that I can overwrite the list of participants in my DB, from the data that Daily.co sent to my hook. :)

  • kwindla
    kwindla Dailynista

    Thank you for the thoughtful write-up about how a participant events webhook would be most useful for you.

    We do want to implement webhooks for session, participant, and recording events in 2023. We've started to plan this work and have an internal prototype. But we don't yet have a ship date set.

    It is really helpful to read your post. We appreciate it!

  • @kwindla Thank you so much, looking forward to it!