Forum Discussion

Holger K.'s avatar
Holger K.
New member | Level 2
10 years ago

CreateSharedLinkWithSettingsErrorException existing URL / name

If the following code throws the exception
CreateSharedLinkWithSettingsErrorException

 

How can I get the existing URL and name?

 

SharedLinkMetadata slm = mDbxClient.sharing().createSharedLinkWithSettings(remoteFolderPath + "/" + remoteFileName, SharedLinkSettings.newBuilder().withRequestedVisibility(RequestedVisibility.PUBLIC).build());
url = slm.getUrl();
ResolvedVisibility res = slm.getLinkPermissions().getResolvedVisibility();
name = slm.getName();
 

1 Reply

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    You can use listSharedLinksBuilder to get the existing shared link for a file or folder. (If you're only interested in links to the exact path, you'll want to use withDirectOnly(true).)

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!