cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Delete or Expire Existing Shared Links

Delete or Expire Existing Shared Links

BobHabig
Helpful | Level 5
Go to solution

Hi,

 

I have been testing the create_shared_link_with_settings endpoint, but have now been instructed to make them expire very quickly. Problem is - I don't have access to my company's actual dropbox account, so I am wondering what the best way would be to

delete the shared links I have created during testing so that they can, in the future, be created and instructed to expire rapidly enough that we should never likely have a response from the create_shared_link_with_settings endpoint saying that there is already an existing link.

 

If you have a suggestion for different endpoints, I am open to hearing them! (but my hands may be tied to this specific endpoint)

 

Thanks in advance!

2 Accepted Solutions

Accepted Solutions

BobHabig
Helpful | Level 5
Go to solution

Thank you, Greg!

 

revoke sounds like the right endpoint for sure. I still do have a problem though I believe - while I do have my auth token, I do not know the URLs of the files and folders that I need to revoke. I know the filepaths, but not the URL. how should I approach this?

View solution in original post

Greg-DB
Dropbox Staff
Go to solution
In that case, you can use /2/sharing/list_shared_links to look up the shared links first:

https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links

View solution in original post

5 Replies 5

BobHabig
Helpful | Level 5
Go to solution
We have already moved away from get_temporary_link, so that is not something I'll be using FYI 🙂

Greg-DB
Dropbox Staff
Go to solution
You'll need to have access to the account to make any changes to it, e.g., to modify or revoke any existing shared links.

If you still have an active access token for the account, e.g., the one you used to make the links originally, that will be sufficient.

You can revoke existing shared links using /2/sharing/revoke_shared_link:

https://www.dropbox.com/developers/documentation/http/documentation#sharing-revoke_shared_link

Or, you can modify existing shared links (e.g., to add or change the expiration) using /2/sharing/modify_shared_link_settings:

https://www.dropbox.com/developers/documentation/http/documentation#sharing-modify_shared_link_setti...

BobHabig
Helpful | Level 5
Go to solution

Thank you, Greg!

 

revoke sounds like the right endpoint for sure. I still do have a problem though I believe - while I do have my auth token, I do not know the URLs of the files and folders that I need to revoke. I know the filepaths, but not the URL. how should I approach this?

Greg-DB
Dropbox Staff
Go to solution
In that case, you can use /2/sharing/list_shared_links to look up the shared links first:

https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links

BobHabig
Helpful | Level 5
Go to solution

Fantastic. Thank you!

 

 

[This thread is now closed. If you have a similar or new question, you can ask here.]

 

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    BobHabig Helpful | Level 5
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?