When i add a comment via the ActiveCollab API with a POST method to /comments/task/{taskId} i am not able to set created_by_id at least, nothing is happening when i put a user id as value. Unlike using /projects/{projectId}/tasks where i can declare and use created_by_id.
However i am able to use /comments/{commentId} with a PUT method, and change created_by_id that way, i really would like to set the userid when i create the comment.
Using ActiveCollab 6.0.50, have read the API documentation. But the example in there only uses body and attachments.
POST method api.php?path_info=/comments/task/1080 HEADERS [{"key":"X-Angie-AuthApiToken","value":"***"},{"key":"Content-Type","value":"application/json"}]
{
"body": "test",
"created_by_id": 1
}
Expected the creator of the message to be the declared userid. Instead the token owner is the creator. Which would be logical, except i declare a userid. As mentioned, using PUT to /comments/{commentId} seems to be happy to accept created_by_id with a userid.
Solved, i just decided to go for picking a token for every user (i think this is the proper way anyway). This part of the API documentation is helpfull for that: https://developers.activecollab.com/api-documentation/v1/people/users/api-subscriptions.html
It enables you to create and get a token for Active Collab users, if authenticated correctly for the function with a token. This way it is really easy to select the correct token. I created a function in my API handler for getting the correct user token and if not existing to create a token.