Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

rachminion's avatar
rachminion
New member | Level 1
11 months ago
Status:
Closed - Inactive

Delete shared links in bulk

Dropbox you are killing me... you give me notifications that we have hundreds of links shared, but no bulk way to remove them. 

What's worse? While I can delete the thousands that I made over the last 3 years, I CANNOT DELETE FOR TEAM MEMBERS WHO HAVE LEFT. 

If you give me the warning there is a security issue of shared links, then have a quick resolution for it. 

5 Comments

Comments have been turned off for this idea
  • Nancy's avatar
    Nancy
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 months ago
    Status changed:
    Open
    to
    Closed - Inactive

    This idea has been closed out after a period of inactivity.

    We appreciate you sharing it with us, and you’re always welcome to submit more ideas in the future.

  • og19's avatar
    og19
    New member | Level 1
    9 months ago

    Someone just needs to wrap this into a tool for me:

    pip install dropbox

    Then:

    import dropbox

    # Replace with your Dropbox access token
    ACCESS_TOKEN = "your_access_token_here"

    def revoke_shared_links():
        """Fetches all shared links and revokes them."""
        dbx = dropbox.Dropbox(ACCESS_TOKEN)

        try:
            # Get all shared links
            response = dbx.sharing_list_shared_links()

            if not response.links:
                print("No shared links found.")
                return

            # Iterate and revoke each shared link
            for link in response.links:
                try:
                    print(f"Revoking link: {link.url}")
                    dbx.sharing_revoke_shared_link(link.url)
                    print("Revoked successfully.")
                except Exception as e:
                    print(f"Failed to revoke {link.url}: {e}")

        except Exception as e:
            print(f"Error retrieving shared links: {e}")

    if __name__ == "__main__":
        revoke_shared_links()

  • Mark's avatar
    Mark
    Icon for Super User II rankSuper User II
    9 months ago

    Oh yes!! 

    A tick box to delete is desperately needed

  • og19's avatar
    og19
    New member | Level 1
    9 months ago

    I've had the same issue for a long time and have contacted support about it. They asked me to post here. 

    There is an API. So it would be pretty easy for someone at Dropbox to write a tool that would expire links older than n months.

  • Walter's avatar
    Walter
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 months ago
    Status changed:
    New
    to
    Open

    This idea is open. 

    If you like this idea, please share how this would help you, and vote to show your support. 

    Our top-voted ideas are shared with our product teams to investigate in our regular reviews.