I'm trying to extend collaborations on certain folders using Box Python SDK. I have been searching this forum for possible solutions but haven't found any. The thread below is the closest related issue found, but it addresses another issue. It is marked as 'Solved', therefore I'm posting this new message.
I am wondering how to extend the collaboration with external users using Python SDK. Creating folders and adding collaborators works but now I want to extend the collaborations. Is there a way to do this using Python SDK?
Below the code that I tried using.
collaborations = client.folder(folder_id=folder_id).get_collaborations()
for collab in collaborations:
collab_role = collab.role
collab_id = collab.id
if collab_role == 'editor':
role = CollaborationRole.EDITOR
role = None
collaboration = client.collaboration(collab_id=str(collab_id))
updated_collaboration = collaboration.update_info(role)
I would prefer to not remove collaborations and adding them again if that's possible.
Suggestion are very welcome!