We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
kashiwagi_yhi
5 months agoExplorer | Level 3
Unable to Download Files Using .NET SDK Since 7/11
Hello, I am developing an application using the Dropbox API and .NET SDK. I have been successfully downloading files using the SDK until 7/11, but since then, the download functionality has stopp...
iNeil
5 months agoDropbox Engineer
Hello kashiwagi_yhi,
I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:
- the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
- the parameter values that you are using with the Dropbox .NET SDK when calling the endpoint(s)
- kashiwagi_yhi5 months agoExplorer | Level 3
Here is the simple code for downloading a file. I have saved "Test.txt" on Dropbox beforehand to test this.
using System; using System.Net.Http; using Dropbox.Api; using Dropbox.Api.Files; using Dropbox.Api.Stone; HttpClient httpClient = new HttpClient() { Timeout = TimeSpan.FromMinutes(20) }; DropboxClientConfig clientConfig = new DropboxClientConfig("application_product_name") { HttpClient = httpClient }; DropboxClient dropboxClient = new DropboxClient("refresh_token", DropboxConfig.AppKey, clientConfig); try { using (IDownloadResponse<FileMetadata> response = await dropboxClient.Files.DownloadAsync("/Test.txt")) { byte[] result = await response.GetContentAsByteArrayAsync(); Debug.LogFormat("DownloadAsync Success {0}", result.Length); } } catch (Exception ex) { Debug.LogWarningFormat("DownloadAsync Error {0}", ex.ToString()); }
The content of ex.ToString() is as follows:
DownloadAsync Error Dropbox.Api.BadInputException: <!DOCTYPE html> <html> <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Dropbox - 400</title> <link href="https://cfl.dropboxstatic.com/static/metaserver/static/css/error.css" rel="stylesheet" type="text/css"/> <link rel="shortcut icon" href="https://cfl.dropboxstatic.com/static/images/favicon.ico"/> </head> <body> <div class="figure"> <img src="https://assets.dropbox.com/www/en-us/illustrations/spot/target-miss.svg" alt="Error: 400"/> </div> <div id="errorbox"> <h1>Error (400)</h1>Something went wrong. Don't worry, your files are still safe and the Dropbox team has been notified. Check out our Status Page to see if there is a known incident, our Help Center and forums for help, or head back to home. </div> </body> </html> at Dropbox.Api.DropboxRequestHandler.RequestJsonString (System.String host, System.String routeName, System.String auth, Dropbox.Api.DropboxRequestHandler+RouteStyle routeStyle, System.String requestArg, System.IO.Stream body) [0x004db] in <3bfaee380a004dbbb66f97b905c0a981>:0 at Dropbox.Api.DropboxRequestHandler.RequestJsonStringWithRetry (System.String host, System.String routeName, System.String auth, Dropbox.Api.DropboxRequestHandler+RouteStyle routeStyle, System.String requestArg, System.IO.Stream body) [0x00179] in <3bfaee380a004dbbb66f97b905c0a981>:0 at Dropbox.Api.DropboxRequestHandler.Dropbox.Api.Stone.ITransport.SendDownloadRequestAsync[TRequest,TResponse,TError] (TRequest request, System.String host, System.String route, System.String auth, Dropbox.Api.Stone.IEncoder`1[T] requestEncoder, Dropbox.Api.Stone.IDecoder`1[T] responseDecoder, Dropbox.Api.Stone.IDecoder`1[T] errorDecoder) [0x000a5] in <3bfaee380a004dbbb66f97b905c0a981>:0 (Truncated for brevity)
Please review and let me know if there are any additional adjustments needed.
- Greg-DB5 months agoDropbox Staff
Thanks for sharing this. I tried out this code though, and it worked successfully for me. Can you confirm if this was the exact code that produced the error you saw? For instance, did you change any of the parameter values after you reproduced the issue before you posted this? If so, please share the actual parameter values you used to reproduce the issue, except for the refresh token.
Also, have you made any changes to the Dropbox SDK's code?
- kashiwagi_yhi5 months agoExplorer | Level 3
Thank you for testing, Greg-DB .
I also tried it again on my side. Strangely, it now works successfully.
Even the code that was not working since 7/11 is now able to download files successfully.
I have not changed the code or parameters.
Could there have been a change on the server side?
Well, I'm glad it's working now, but I still find it quite puzzling why this happened in the first place.
Thank you.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,878 PostsLatest Activity: 5 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!