Thank you very much for your answer. This is exactly what I was looking for.
Now I think the way to achieve my goal is to create a webhook with ‘COLLABORATION.ACCEPTED’ trigger, that way I can assign the approval task to the user. So I need the user id to assign the task.
But is ‘collab.id’ the user id? The API documentation doesn’t say so but I note that you wrote ‘Collaborator:’.
To your question, the collaboration id is not the user id.
Within the collaboration object, which essentially links a file or folder to a user, there is a section called accessible_by. This represents the user “collaborated”.
So in the previous example if we add this line before deleting the collaboration: