Identifying the source of events in Vonage Video Session Monitoring Identifying the source of events in Vonage Video Session Monitoring

Identifying the source of events in Vonage Video Session Monitoring

Vonage API Support

Objective

To ensure that the userId or any other claims passed during the token creation are correctly received in the session events, enable the backend to identify the source of the events. This involves understanding the correct usage of the connection_data claim in the token and addressing the issue where the data property arrives empty in the events.

Applies To

  • Video API

Procedure

In Vonage Video session monitoring, it is necessary to identify the source of events. The userId or any other claims passed during token creation should be received in the events, allowing the backend to identify where the event occurs.

When we use a userId key to set our values there's no explicit link between userId and data. To pass that information to the callback response, you must assign the userId to a connection_data claim in the token. 

For example:

{

   "iat": xxx,

   "applicatoinId": xxx,

   "jti": xxx,

   "role": xxx,

   "session_id": xxx,

   "scope": xxx,

   "connection_data": {yourUserId},

}

Additional Information

https://developer.vonage.com/en/video/guides/session-monitoring#connection-created
https://developer.vonage.com/en/video/guides/create-token#connection-data

https://github.com/Vonage/vonage-dotnet-sdk/issues/578