GET /v1/presence should return userData

Options
2»

Comments

  • ricardopieper
    ricardopieper Member
    edited January 2023
    Options

    @daily_joey alright! I hope you guys can find a way to do this. It would be immensely useful and solve a lot of problems for us. For us it does not matter if it's through userData or anything else, though it would be nice if it returned the userData. Or make it optional in the /presence API, so people already using the presence API don't generate a ton of extra load in your servers, or even make another API call that returns the user datas for a list of participant IDs. Anything at all would be incredibly useful.

  • miguel
    Options

    Hi there,

    Any updates around this issue?

    We're facing the exact same issue. We want to be able to pass a user_id AND have knocking enabled in our room. Within the room the .participants call works great, but we want to check who is in the room from outside the video call instance and hence the need for this user_id at the earlier stage. Would be great to be able to pass it as a param like userData or for the userData to have a special field of user_id that automatically gets mapped to the info returned by /presence

    Any other way of getting this participant data would be great as well.

    Thank you in advance,

    Miguel

  • daily_joey
    daily_joey Moderator, Dailynista admin
    Options

    Hi @miguel ,

    At the moment, meeting tokens cannot be used alongside the "knocking" functionality, which is not directly related to userData.

    For checking which participants are already in a call, you can still use the /presence endpoint, either at the domain level or for an individual room, and receive information like the following:

    {"total_count":1,"data":[{"room":"w2pp2cf4kltgFACPKXmX","id":"d61cd7b2-a273-42b4-89bd-be763fd562c1","userId":"pbZ+ismP7dk=","userName":"Moishe","joinTime":"2023-01-01T20:53:19.000Z","duration":2312}]}
    

    Note that the response includes both user name and ID information, but not userData, which is only accessible from within the session, this has not been changed.

    As a workaround, additional user state information can be stored in an external database, and you can supply a matching user ID from your database via a meeting token which will show up in /presence information. This presence information can then be used to match users in a Daily session back to records in your own database.

  • miguel
    Options

    Hi @daily_joey ,

    Thanks for the reply. I did not get a notification so I had not seen it yet.

    We settled on building our own "waiting" functionality with all users having the meeting tokens. As you describe, this makes things work in the /presence endpoint.

    Just to double check I understood correctly, there is no way to pass the user_id to a Prebuild callframe without a token and make it appear in the data from the /presence call right?

    Thanks again for your help.

    Best

    Miguel