Skip to main content
Question

Updating Collaboration to "Owner" and Creating collaboration to "Owner" not working using API

  • May 21, 2025
  • 2 replies
  • 7 views

Forum|alt.badge.img

Hi,

 

I have been trying to update Folder collaboration using Python. Everything works except when i change role to "owner". I get message "item with same name already exists" when i try to update the collboration. According to API doc, it should demote owner to co-owner and co-owner to owner but not happening. 

 

Also, when creating entirely new collaboration from API and adding user as owner. I am getting "Invalid value "owner" 'role' with value "owener" not found. Please let me know what am i missing here.

 

I tried POSTMAN and got the same issue as well.

 

For instance i used this code in python:

    

try:
url = API.BASE_API_URL+"/collaborations/"+collab_id
data = {
'role':'owner'
}
box_response = self._session.put(url, data=json.dumps(data))
return box_response.status_code

except BoxAPIException as ex:
print(ex)
 
 

Thanks in advance.

Bibek

2 replies

Forum|alt.badge.img

Hi ,

 

For the owner error where you see that a name exists already, I believe that may be caused by the content the new owner has. Check with the new owner to see if they have a folder with the same name and then try to update your collaboration again.

 

 


Forum|alt.badge.img

HI Howard,

Thanks for the response. And yes, that was the case. I overlooked the fact that the user could have folder with the same name. I implemented the Folder rename in that case.

 

Appreciate your response. I marked it as solution. 

 

thanks, 

Bibek