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's avatar
attilagal
Explorer | Level 3
8 years ago

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!!

    • attilagal's avatar
      attilagal
      Explorer | 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

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,883 PostsLatest Activity: 4 hours ago
326 Following

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 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!