OpenVidu / openvidu

OpenVidu Platform main repository
https://openvidu.io
Apache License 2.0
1.87k stars 463 forks source link

/openvidu/api/recordings/start #782

Closed bobby-8084 closed 1 year ago

bobby-8084 commented 1 year ago

1.Recordings Api not working https://xxxxx.com/openvidu/recordings/start body { "session": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "outputMode": "INDIVIDUAL" } show this error of response { "timestamp": "2023-01-20T07:20:26.177+00:00", "status": 401, "error": "Unauthorized", "message": "", "path": "/openvidu/api/recordings/start" } Can anyone help on this

CSantosM commented 1 year ago

If you had read the documentation you would not think this is a bug. The REST API documentation is clear enough https://docs.openvidu.io/en/2.25.0/reference-docs/REST-API/#post-recording-start.

Your reqquest is wrong. As the response says, You are not authorized because you are missing the credentials.

bobby-8084 commented 1 year ago

I added Authorization Headers (Basic Auth) username:xxxxx password:xxxxxx and body is { "session":"xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx", "name": "MyRecording", "hasAudio": true, "hasVideo": true, "outputMode": "COMPOSED", "recordingLayout": "CUSTOM", "customLayout": "mySimpleLayout", "resolution": "1280x720", "frameRate": 25, "shmSize": 536870912, "ignoreFailedStreams": false, "mediaNode": { "id": "media_i-0c58bcdd26l11d0sd" } }