Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Update (01/14/2019): Finally back to trying to use this code. A resolution was seemingly made, but not fully implemented. I am able to access the API now, but I still cannot use file/download. I have detailed more of this in my latest post.
Hello. I have happily been a user of yours for last several years, using the Dropbox API from within Second Life. This has given me a rather powerful tool for handling data storage, but your v2 API will not function from withint Second Life any long.
I have been trying to migrate from v1 to v2 ahead of time, and I ran into an error that cannot be fixed within Second Life.
Error in call to API function "files/download": You provided a non-empty HTTP "Content-Type" header ("text/plain; charset=utf-8"). This API function requires that the header be missing or empty.
The problem lies here in Second Life:
http://wiki.secondlife.com/wiki/LlHTTPRequest
You cannot override the Content-Type headed, because it is automatically generated from within Second Life itself. Can you fix this problem? There seems to be little reason that the API could not ignore this content type header if you are doing a download, like it did before.
This prevents me from upgrading to v2, and would break all of my current code in Second Life if it cannot be fixed.
Okay well, I think I've been more than patient enough. Today was supposed to be the day I wipe my hands of this and just accept you had no interest in fixing the problem. It turns out though that you intend to keep me in limbo for another few months.
So, are you or are you not going to fix my issue? I already had to make the announcement I was shutting down because you guys refused to change this -one- line of code to allow me to stay on. I am not going through 3 more months of limbo wondering if you will or won't. I need to know if my development process is done or not; if I am shutting down, or if you guys actually intend to fix it.
I believe this is entirely reasonable. If you don't think I am important enough to worry about, and you don't intend to fix it, then just say so, and I will move on with my life. If you're refusing to answer because you're trying to save face, I don't appreciate it, nor do my users. I would like an answer for once since the six months ago I asked.
Hello. I have finally come back to the platform on another attempt to use the endpoints. Picking up where I left off, I decided to finally try and see if it would work, but upon trying it out, I got the same error as before. I am specifying the MIME type as both "text/plain" and "text/plain; charset=utf-8". Neither one shows any different result.
So far it is spitting back "Unsupported or unknown Content-Type." once again. Maybe something else has change since my original attempt, but are the new supported content types still working, or was something eventually changed?
Edit: Alright, I have finally been able to confirm that the error stems only from file/download. Other API calls seem to be working, but I am unable to get the contents of the .txt files I had on the server previously. The content type is still incorrect when I am receiving a response from the server.
http://wiki.secondlife.com/wiki/Http_response
Status 415 "Unsupported or unknown Content-Type"
The remote server did reply to your request but the Content-Type of the reply (such as XML, JSON, Atom, RSS, PLS) is not recognized by the LL server and so is not passed back to the script. You can assume that 415 means the server heard your request and did reply.
I just tried this, and the new supported content types are working for me. Here are a few sample calls:
$ curl -X POST https://content.dropboxapi.com/2/files/download \ > --header "Authorization: Bearer <ACCESS_TOKEN>" \ > --header "Dropbox-API-Arg: {\"path\": \"/test.txt\"}" This is the test file data. $ curl -X POST https://content.dropboxapi.com/2/files/download \ > --header "Authorization: Bearer <ACCESS_TOKEN>" \ > --header "Dropbox-API-Arg: {\"path\": \"/test.txt\"}" \ > --header "" This is the test file data. $ curl -X POST https://content.dropboxapi.com/2/files/download \ > --header "Authorization: Bearer <ACCESS_TOKEN>" \ > --header "Dropbox-API-Arg: {\"path\": \"/test.txt\"}" \ > --header "Content-Type: application/octet-stream" This is the test file data. $ curl -X POST https://content.dropboxapi.com/2/files/download \ > --header "Authorization: Bearer <ACCESS_TOKEN>" \ > --header "Dropbox-API-Arg: {\"path\": \"/test.txt\"}" \ > --header "Content-Type: text/plain" This is the test file data. $ # using the verbose option for more detail: $ curl -vX POST https://content.dropboxapi.com/2/files/download \ > --header "Authorization: Bearer <ACCESS_TOKEN>" \ > --header "Dropbox-API-Arg: {\"path\": \"/test.txt\"}" \ > --header "Content-Type: text/plain; charset=utf-8" > POST /2/files/download HTTP/1.1 > Host: content.dropboxapi.com > User-Agent: curl/7.54.0 > Accept: */* > Authorization: Bearer <ACCESS_TOKEN> > Dropbox-API-Arg: {"path": "/test.txt"} > Content-Type: text/plain; charset=utf-8 > < HTTP/1.1 200 OK < Server: nginx < Date: Tue, 15 Jan 2019 16:25:48 GMT < Content-Type: application/octet-stream < Content-Length: 27 < Connection: keep-alive < accept-ranges: bytes < etag: W/"73c1c021eccc7" < pragma: no-cache < cache-control: no-cache < original-content-length: 27 < dropbox-api-result: {"name": "test.txt", "path_lower": "/test.txt", "path_display": "/test.txt", "id": "id:25N5ksooX-sAAAAAAAKn0Q", "client_modified": "2019-01-15T16:24:48Z", "server_modified": "2019-01-15T16:24:49Z", "rev": "73c1c021eccc7", "size": 27, "content_hash": "cceac37da5288a6b6716737310c14305c9b16a6e0ff0abce4a306c3de3a59f75"} < X-Server-Response-Time: 1984 < X-Dropbox-Request-Id: c87ab76814c43ef58c5d284e646fdec7 < X-Robots-Tag: noindex, nofollow, noimageindex < * Connection #0 to host content.dropboxapi.com left intact This is the test file data.
While you can now specify any of those three newly supported Content-Type values (or none) for the request, the response's Content-Type for /2/files/download is not guaranteed to be the same as that of the request; it is always "application/octet-stream" to indicate that it is returning the binary data for the requested file (assuming the call succeeded).
I'm not familiar with your platform, but from the SecondLife documentation you quoted it sounds like the issue now is that "LL server" isn't accepting the the "application/octet-stream" response Content-Type for the response from Dropbox for the /2/files/download call.
Thanks for the feedback! It's much appreciated, and I've shared it with the team.
As far as specific changes to API v2 are concerned, the original requested change here, to support more Content-Type values for requests to /2/files/download, was implemented and is working. Is there another specific change that would be helpful for API v2? I can't make any promises as to whether or not we'd be able to make any particular change, but I'd be happy to send along another request to do so.
Hi there!
If you need more help you can view your support options (expected response time for a 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!