You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
attilagal
8 years agoExplorer | Level 3
problem initializing DropboxClient instance
Hi all,
I could achieve file upload from Web API. I get the posted file, and I could upload it to dropbox and get shared URL of the upped file.
However, deploying the app to Azure, I get an exception when creating the DropboxClient object, and all information is:
ErrorMessage: "shared_link_access_denied/"
ErrorResponse is a SharedLinkError.SharedLinkAccessDenied
Code is:
try { dropBoxClient = new DropboxClient(s, new DropboxClientConfig("Forecast5")); remoteFilePath = String.Format("{0}/logo.jpg", formData["id"]); var result = await dropBoxClient.Files.UploadAsync(remoteFilePath, WriteMode.Overwrite.Instance, body: fileStream); }
No idea and what to try. Anyone with a suggestion or idea?
Thanks in advance!!
The constructor and the UploadAsync method don't raise a SharedLinkAccessDenied. It looks like you're actually calling GetSharedLinkMetadataAsync somewhere.
Anyway, SharedLinkAccessDenied means that the "caller is not allowed to access this shared link". That is, it sounds like the user for the access token you're using doesn't have access to the shared link you're passing in to GetSharedLinkMetadataAsync.
- Greg-DBDropbox Staff
The constructor and the UploadAsync method don't raise a SharedLinkAccessDenied. It looks like you're actually calling GetSharedLinkMetadataAsync somewhere.
Anyway, SharedLinkAccessDenied means that the "caller is not allowed to access this shared link". That is, it sounds like the user for the access token you're using doesn't have access to the shared link you're passing in to GetSharedLinkMetadataAsync.
- attilagalExplorer | Level 3
Fuh, you were right!
Due to a bad error handling and awful debugging experience, it was really because of accessing a wrong url as shared link.
Thank you very much!!!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,883 PostsLatest Activity: 4 hours agoIf 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 or Facebook.
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!