Iām setting up an application which trigger a call. The user running the app has a dedicated account āalarmā.
When i am executing : curl -d ā{āflagsā:1}ā -H āOCS-APIRequest: trueā -u āalarm:passwordā āhttps://MYDOMAIN/ocs/v2.php/apps/spreed/api/v1/call/CONVERSATIONTOKENā
It sometimes works (returns 200 and trigger a nextcloud talk call) and sometimes doesnt : nextcloud returns a 404 failure (same in apache logs)
I noticed that this is only working if the specific conversation has been open by the user alarm through a browser in the last ~2 minutes.
I then checked all calls a browser was building when opening this conversation in order to perform the same call with curlā¦ (/participants/activeā¦) but with no successā¦ I tried aswell to set the user agent or things like this
As you almost found out yourself, you need to be active in a channel to be able to start a call.
But as you are performing very hackish things here (joining without listening to signaling api, etc) I just want you to be aware that this could break any time.
I managed to get it to works, thanks to someone on the cloud.nextcloud.com public discussion !
I guess I was doing the POST call to room/token/participants/active in a wrong wayā¦
So, executing this POST request :