Skip to main content
Solved

API to remove specific user share with a specific file

  • July 25, 2023
  • 1 reply
  • 252 views

Hi,

Is there any API that can remove specific user share from a specific file? I saw there is an API to remove a collaborator in general from the account, and i saw i can remove shared link like public or domain links, but I just want to remove specific user I shared with him the file from the specific file I shared with him.

Thanks for the help.

Best answer by CodeBoxSeb

Welcome to the forum @user46 ! 😃


First, you’ll need to identify the Collaboration ID : https://developer.box.com/reference/get-files-id-collaborations/


Then, once you have the collaboration ID, you can remove the collaboration ID : https://developer.box.com/reference/delete-collaborations-id/


You have to keep in mind that you can have many collaboration IDs for the same file, if for example, you have created the collaborations separately.


It means that, if a collaboration ID has been created to a single user, then if you remove the collaboration ID, it will remove the user from the collaboration. On the opposite, if you collaborated 3 users under the same collaboration ID, it will remove the 3 users when you remove the collaboration ID.

View original
Did this topic help you find an answer to your question?

1 reply

CodeBoxSeb
  • Participating Frequently
  • 58 replies
  • Answer
  • July 26, 2023

Welcome to the forum @user46 ! 😃


First, you’ll need to identify the Collaboration ID : https://developer.box.com/reference/get-files-id-collaborations/


Then, once you have the collaboration ID, you can remove the collaboration ID : https://developer.box.com/reference/delete-collaborations-id/


You have to keep in mind that you can have many collaboration IDs for the same file, if for example, you have created the collaborations separately.


It means that, if a collaboration ID has been created to a single user, then if you remove the collaboration ID, it will remove the user from the collaboration. On the opposite, if you collaborated 3 users under the same collaboration ID, it will remove the 3 users when you remove the collaboration ID.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings