Closed jcharro1979 closed 5 months ago
Hi @jcharro1979,
Thanks for letting me know. I'll have a look and get back to you asap.
@jcharro1979,
So, the problem is you used a userId
key to set your value. There's no explicit link between userId
and data
.
If you want to pass that information to the callback response, you need to 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},
}
Can you give it a try and let me know?
Hello @Tr00d:
Thank you very much for your response, I have completed tests and I already obtain the user information in the callback event.
However, I think that the documentation should be updated, since this claim connection_data
is not specified.
Thank you very much
Greetings
@jcharro1979,
Absolutely, I went through the same struggle you did so I asked the documentation to be improved. Also, I think I'll try to make this obvious (as a feature) in the SDK as well.
In Vonage Video session monitoring, it is necessary to identify the source of events. According to the documentation at https://developer.vonage.com/en/video/guides/session-monitoring#connection-created, information is expected to be provided in the 'data' property, as described in https://developer.vonage.com/en/video/guides/create-token#connection-data. For example, userId should be included. However, in our tests, the 'data' property always arrives empty.
Expected behaviour 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.
Token with new userId claim
connectionCreated event with data property empty.