Hello @micael.gallego,
I am planning use the events from webhooks to implement some of the interactions of the user.
I would like to add some custom fields to webhook data which needs to be reported with every event.
Something similar to “clientData” field but not related any client. It is related to session.
timestamp: 1597204010440,
startTime: 1597203832195,
duration: 178,
reason: 'disconnect',
participantId: 'con_GNerVRI4fm',
location: 'unknown',
platform: 'Chrome 84.0.4147.105 on OS X 10.15.6 64-bit',
clientData: '{"name":"SUNG Sam","color":"#1A80F9"}',
serverData: '',
event: 'participantLeft'```
This is not possible. OpenVidu Webhook events do not provide custom fields to be set. May I ask what kind of use case requires this feature? I think you will be able to store any kind of data you want in your server side and relate it to any kind of event you receive from the webhook endpoint. I mean, I don’t really understand why you need to pass custom data inside the events themselves: each event uniquely identifies the session/participant that triggered the event. You can store any kind of custom data for that particular session/participant in your backend, right?
Regards.
Thanks for the suggestion @pabloFuente. I am refactoring my code base to store these values in my database.