Search code examples
c#.netvb.netdropbox-apidropbox-sdk

Dropbox v2 SDK Dot Net Delete Shared link


I am using VS2013 Winforms and Dropbox SDK version 5.5.0 for Dot Net and trying to "delete" or "unshare" the shared public link created earlier with this code but it is not working.

Await dbx.Sharing.UnshareFileAsync("FilePath")

It throws an exception > "Error in call to API function "sharing/unshare_file": Your API app is an "App Folder" app. It is not allowed to access this API function" Any ideas why is it so and how to delete the public shared link.


Solution

  • The UnshareFileAsync method is for unsharing a specifically shared file, not for deleting a shared link. (These are different features.) Per the error message, this method is not supported for apps using the "app folder" access type, so your app cannot call it.

    If you want to revoke a shared link, you should instead use RevokeSharedLinkAsync.