Talk API - Problem adding users to conversations


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"?>
  <message>Invalid query, please check the syntax. API specifications are here:

I used curl i.e.:

curl -X POST -d 'newParticipant:test' -d 'source=users' -H "OCS-APIRequest: true" -v -u "<user>:<pw>"

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

Can anyone help me with that?


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


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!


1 Like