API Delete of a Share using a Share ID...

  • 1
  • Question
  • Updated 2 weeks ago
Hello,

 I am integrating the ShareFile function into our Customer Portal using the ShareFile APIs.  We are allowing out customers to Upload files to us using the RequestShare API.  I create a RequestShare and our customers can then upload files to us.  Working great.

 What I need to do is to limit the lifespan of the link that I create.  I am setting the ExpirationDate to manage the amount of time that the link will remain active (this feature is working for me), but I also want to disable the link when our customers log out of our portal.  The idea is to limit the link's usefulness to the shortest period of time possible.

 My idea was to keep track of the RequestShare's ID and then upon logout, call the DeleteShare API.  This is the http DELETE to https://<company>.sf-api.com/sf/v3/Shares(id).  Am I correct in thinking that after performing the Delete that I would expect the Share that I created to no longer work?

 I am able to send the http DELETE.  I receive a status code of 204 with a message of "No Content".  I believe this is the correct response to this request.

 However, when I attempt to use the RequestShare link that was previously created, it appears to be operational (it still works).  Also, if I get a list of Shares (https://<company>.sf-api.com/sf/v3/Shares), the Share shows up in the list.  It was never deleted.

 Am I using the Delete Share API correctly?  Should I expect the share to continue to be active after the delete?  Is there a different way to accomplish what I am trying to do?

 Thank you for your time!

Scott
Photo of Scott Parks

Scott Parks

  • 2 Posts
  • 0 Reply Likes

Posted 2 weeks ago

  • 1

Be the first to post a reply!