Talk API - Problem adding users to conversations

Hi,

Can anyone help me to use the Talk API either via curl or via php? I tried hard the last hours with certain api calls, but all I got was a

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>404</statuscode>
  <message>Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.
</message>
 </meta>
 <data/>
</ocs>

I used curl i.e.:

curl -X POST -d 'newParticipant:test' -d 'source=users' -H "OCS-APIRequest: true" -v -u "<user>:<pw>" https://cloud.fra.at/ocs/v2.php/apps/spreed/api/v1/room/r8wukdy6/participants

my use case would be to add a user to an existing conversation.

Can anyone help me with that?

Thanks,
Marcus.

1 Like

Here’s the documentation for the Participants API:

There is also some information about the error codes:

  • 404 Not Found When the conversation could not be found for the participant

Are you sure this is correct and doesn’t have to be written with ‘:’ instead of ‘=’? Btw you can omit the source, because ‘users’ is the default.

1 Like

Hi,

Oh, this is so embarrassing! Actually the mistake was the other parameter which must read

-d 'newParticipant=test'

I had this 404 error all the time and was trying a lot with different formats - also with JSON. It seems that this was a left over from my JSON attempts…

So, your comment gave me the right hint! Thank you very much for that!

Marcus.

1 Like