Hello,
A question: using openvidu-node-client to call OV Server REST API it’s supposed that I get the JSON sample return indicated in the documentation?
https://openvidu.io/docs/reference-docs/REST-API/#get-apisessionsltsession_idgt
I mean:
app.get('/api-sessions/:sessionId', function (req, res){
var data = req.body;
console.log(data);
res.status(200).send('ok');
});
This openvidu-node-client code get that sample return?
That is not openvidu-node-client code. That’s a plain HTTP request made with Node to some HTTP endpoint (not exposed by openvidu-server, by the way)
OK, I was checking openvidu-client-node code in github right now and I understood. I got the desired sample return requesting https://MY_OV_SERVER:4443/api/sessions/y94doisgeszebwnm. It is not working with the custom_session_id https://MY_OV_SERVER:4443/api/sessions/test. In this case I got a 404 because this url doesn’t exist in the server.
Custom_session_id only works in openvidu-node-client context? In direct requests to the OV Server REST API I need to use always the random identifier that the server generates?
Thanks
No, custom session id works exactly the same as a normal session id. No difference at all. If you get 404, then that means that session is not initialized in OpenVidu Server.
1 Like