Is the same as

Hi Rui,

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 ‘’ the user id? The API documentation doesn’t say so but I note that you wrote ‘Collaborator:’.


Hi @Ooshot ,

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:

        f"Collaboration User: {} {collab.accessible_by.type} {} {collab.accessible_by.login}"

You get the user object that was collaborated:
Collaboration User: 18685785980 user

You can also list the existing collaborations by file or folder. In the previous example:

# get the folder collaborators
    collaborators = folder.get_collaborations()
    print(f"Folder {} ({}) collaborators:")
    for collaborator in collaborators:
            f"\tCollaborator: {} {collaborator.status} role: {collaborator.role} invite: {collaborator.invite_email})"

With the COLLABORATION.ACCEPTED webhook, you get the, from there you get the user, for which you can create a task.

Note that my example was collaborating a folder, and tasks are only applicable to files.

Here is some documentation examples specific for the Python SDK: