This is the sample return data for a valid POST to /api/tokens:
{
"id": "wss://localhost:4443?sessionId=zfgmthb8jl9uellk&token=lnlrtnkwm4v8l7uc&role=PUBLISHER&turnUsername=FYYNRC&turnCredential=yfxxs3",
"session": "zfgmthb8jl9uellk",
"role": "PUBLISHER",
"data": "User Data",
"token": "wss://localhost:4443?sessionId=zfgmthb8jl9uellk&token=lnlrtnkwm4v8l7uc&role=PUBLISHER&turnUsername=FYYNRC&turnCredential=yfxxs3",
"kurentoOptions": {
"videoMaxSendBandwidth": 700,
"allowedFilters": [
"GStreamerFilter",
"ZBarFilter"
]
}
}
The token is embedded inside a websocket URI called, 'token'
. It seems like this should be 'wssUri'
and a separate parameter should be given for 'token'
which is in the above example, lnlrtnkwm4v8l7uc
.
While I have not fully implemented OV yet, I had expected I would need to be handling the token directly.
For example, in the openvidu-call-react
app it uses the actual token string to make the connection to the session.
I’m not sure how to provide that to the frontend without first parsing the URI into components to get at that string.
Perhaps I’m missing something here. Is there a reason the token is only returned as a bundled parameter of a websocket URI?