Comments
-
What's the response from the API to this call?
-
This looks like essentially the same problem, but for a different endpoint. The code you're using must be causing RestSharp to change the Content-Type, perhaps when you're calling AddFile. You should send up the file content as an octet stream in the body, not as multipart form data.
-
Specifically, when using RestClient with API v2 calls, it looks like you should use .AddJsonBody instead of .AddParameter.
-
What makes you think your HTTP client isn't overriding the Content-Type, and how are you checking that? That error message from the server just echoes back the Content-Type it received. Note that the OAuth endpoints work differently from the other API endpoints, so those aren't a good comparison. You are using something…
-
The error response is indicating that the call supplied an unexpected Content-Type header value. Specifically, the server received "application/x-www-form-urlencoded", when it only expects one of "application/json", "application/json; charset=utf-8", or "text/plain; charset=dropbox-cors-hack". It looks like you are trying…
-
For API v1, you can send these parameters as URL parameters, or form encoded in the body. For example, either of these are valid: curl -X "POST" "https://api.dropboxapi.com/1/fileops/copy" \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ --data "root=auto&from_path=/test.txt&to_path=/test_new.txt" or curl -X "POST"…
-
The body of the response for the API call will contain more information. Please print that out in order to see what the issue is.
-
The Dropbox API doesn't offer a way to download an entire folder at once, or files in bulk, so you'll need to iterate through the specific files you want to download. I'll be sure to pass this along as a feature request though.
-
Yes, you can use generated access tokens there. OAuth 2 access tokens generated via the App Console work the same as OAuth 2 access tokens retrieved via the OAuth flow (i.e., /oauth2/authorize and /oauth2/token). The only difference is that you can only generate an access token for your own account, whereas the OAuth flow…
-
For reference, this is a Core API a.k.a. API v1 endpoint, documented here: https://www.dropbox.com/developers-v1/core/docs#files_put API v1 supports both OAuth 1 and OAuth 2 for authentication, with OAuth 2 being preferred. When you make an API call, the OAuth access token you supply with it identifies the relevant…
-
The SSL certificate for a server is used for connections to that server, and shouldn't be involved in outgoing connections made by that server (e.g., to the Dropbox API).
-
No Dropbox doesn't ban IP addresses for sending too many requests. The Dropbox API does have a rate limiting system, but it will always reply with a 429 or 503 status code (i.e., it won't just let the connection time out). Anyway, the issue probably wouldn't be with the code, as you mentioned the same code works on another…
-
Hi Dennis, we're not experiencing any service disruptions for api.dropboxapi.com right now, and especially since it works on one and not the other, it sounds like the issue here may be with the configuration or network connection for that first VPS. Is there anything on that VPS that might be interfering with the…
-
Thanks for the additional information! Note that "app folders" for apps with the app folder permission are specially created folders inside the "/Apps" folder in your account. So, when you create your own folder at /acme1066/Homework/math, that won't connect to your app. The app's actual app folder would be…
-
That's correct, you don't need to share links to be able to access file listings and content via the API. You can use /files/list_folder to list the files in a folder, even if you haven't created links for them. And you can use /files/download to access the file content. That said, you should receive shared links…
-
When you say you created an app with "limited access", I presume you mean you registered an app with the app folder permission. When calling /sharing/list_shared_links with an app folder app, and not specifying a path parameter, it will only return shared links that exist for files that has access to, i.e., in its app…
-
Hi Mark, I'll be happy to help with this, but it's ****** to follow without seeing the actual API calls you're making. Can you share the set of API calls, including both requests and responses, that show the issue? Just be sure to redact the access token (and any other private information). Thanks in advance!
-
The Dropbox API doesn't make any guarantees about the exact format of an access token like this, so we don't recommend trying to validate them using a regex. Further, access tokens can be revoked remotely anyway, so the only way to check if an access token is actually valid is to attempt an API call with it (e.g., most…
-
You'll need to apply for production to enable more users to link to your app. You can find more information on this here: https://www.dropbox.com/developers/reference/devguide#production-approval
-
Hi Marco, I'm not sure I follow, but it sounds like you may be calling the startOAuth2Authentication method when you don't intend to. You may want to add some logging around that, or step through with a debugger to see where that's happening. You can refer to the Android sample app here to see how it handles it:…
-
No, the API doesn't offer a way to get thumbnails for video links.
-
No, temporary links only return the original file content, and don't offer an option for getting thumbnails.
-
Unfortunately, the Dropbox API doesn't currently support thumbnails for video files.
-
The unsupported_image error means "The image cannot be converted to a thumbnail." It sounds like you're trying to get thumbnails for videos specifically, but unfortunately that's not currently supported. We'll consider it a feature request though.
-
Glad to see you sorted this out already! Newer versions of CocoaPods do require that, so we'll update the sample on our site to match.
-
[Cross-linking for reference: https://stackoverflow.com/questions/37876578/access-dropbox-api-from-a-server-located-in-mainland-china ] We are aware that our servers are inaccessible from China. This issue is outside of our control, so unfortunately we’re unable to offer advice or assistance.
-
No, attempting to make a user call like ListRevisionAsync with a DropboxClient with a team-linked access token would just fail with an error message explaining the issue.
-
The ListRevisionAsync method is always specific to a single user, and it takes a path parameter to identify the path inside that user's account. In the first example, Client.ListRevisionAsync(path), the client object needs to be for a "user-linked" API app, where the app is linked to a specific user. This would be a…
-
Thanks Romain! The team is also working on a fix here: https://github.com/dropbox/dropbox-sdk-js/pull/79
-
Thanks for the report! This looks like an issue in the library itself, not how you're using it. We're looking into it.