I am developing an Android app with video call feature using OpenVidu. Our server uses the 2.17.0 version.
In order to get a Token for a room (whose room name i have already from my server) i create a HttpRequest on the BASE_URL/openvidu/api/sessions/fd84f1d0-bdee-4344-800d-a3bab934d8c7/connection. In a previous version of the documentation i was informed that i need to pass a “session” String as a Body parameter. So the real request happening is the following
I: --> POST https://BASE_URL/openvidu/api/sessions/fd84f1d0-bdee-4344-800d-a3bab934d8c7/connection
I: Content-Length: 50
I: Authorization: Basic MY_AUTH_TOKEN
I: Content-Type: application/json;charset=utf-8
I: Accept: application/json;charset=utf-8
I: {"session":"fd84f1d0-bdee-4344-800d-a3bab934d8c7"}
I: --> END POST (50-byte body)
This request responses successfully with a valid token.
However, in the documentation 2.17.0 i can see that the object that need to be passed in the request does not include any “session” parameter. So when i delete this parameter and i dont send any Body then i get an Exception that says “Bad request”.
How is it possible that a request with wrong parameters work fine and a request with right parameters (as it suppose to handle the absent values as default values) not work at all…??
Thank you