Greg-DB Dropbox Community Moderator

Comments

  • Are you setting the 'Content-Type' value for your request? It would be in your custom_header variable but you didn't share the definition for that. You should set it like: "Content-Type": "application/json" If you don't, the API call parameters won't get sent properly. You can use the API Explorer to help prototype these…
  • The 'offset' value is "The amount of data that has been uploaded so far. We use this to make sure upload data isn't lost or duplicated in the event of a network error.". That is to say, it should be the number of bytes that you have already uploaded so far for that particular upload session. You should keep track of this…
  • The 'restricted_content' error from the /2/files/download endpoint on the Dropbox API indicates that the file being requested "cannot be transferred because the content is restricted. For example, sometimes there are legal restrictions due to copyright claims." If you believe you've encountered files that have incorrectly…
  • The Dropbox API doesn't offer a way to directly link to and open files in the native app like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. You can create shared links, but those would only open the Dropbox web site. Depending on the platform (e.g., this…
  • No, unfortunatelty there isn't a batch option for sharing folders in particular, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 
  • @"bramburn" Please try replacing this line: dbx = dropbox.Dropbox(ACCESS_TOKEN) with this instead: dbx = dropbox.Dropbox(ACCESS_TOKEN, timeout=None) Then try again and let me know if that does or doesn't help. Also, you don't need those time.sleep calls, so you can remove those.
  • Thanks for the post, and apologies that the error message isn't more helpful in this case. For this `internal_error` case, I looked it up and I can confirm that it's actually due to "lock contention". That's a result of how Dropbox works on the backend. It's a technical inability to make multiple modifications, such as…
  • Thanks for trying that. That output indicates the upload was succesful, so the issue does seem to be specific to your Python environment/code. We'll take a closer look at the code you shared.
  • To clarify a bit, you need one "upload session" per file. Each upload session gets its own session ID. When adding data to a single upload session, you need to identify how much you've already added to that upload session by using the "offset" value. This helps make sure you're uploading the right pieces. If you specify…
  • Thanks for the additional information! To try to isolate whether this is a general networking issue, or if this is related to the Python environment/code in particular, can you try making an upload call outside of Python? You can use the API v2 Explorer to make a call directly, or to get the curl code for running it bash.…
  • I'll be happy to try to get some more clarity on this issue for you, but it would be helpful to get some more information so I can be sure I understand exactly what parameters you're using and what behavior you're seeing. Can you share the actual HTTP requests and responses for the API calls you're making, including the…
  • In order to use the batch upload finish endpoint, you do need to use upload sessions. The relevant endpoints are: * https://www.dropbox.com/developers/documentation/http/documentation#files-upload_session-start * https://www.dropbox.com/developers/documentation/http/documentation#files-upload_session-append *…
  • This can happen when attempting to upload multiple files at once. The 'too_many_write_operations' error indicates "lock contention". That's not explicit rate limiting, but rather a result of how Dropbox works on the backend. This is a technical inability to make a modification in the account or shared folder at the time of…
  • Retrieving the metadata for the root folder ('') is not supported. It doesn't have any specific metadata to return, but you can list its contents, as you found. Accordingly, attempting 'files_get_metadata' will fail. You can get the metadata for a non-root folder by specifying the path, e.g., like "/FolderName".
  • @"florianCH" Can you check the network request, e.g., using the developer tools in your browser, to see what error/response you're getting for the larger file?
  • Your connection speed to Dropbox depends on the routing you get between your ISP and our servers, and may be slower than your ISP's rated speeds. Unfortunately there isn't a way to increase the speed of the connection. Dropbox does not offer a way for API clients to peer with its servers. I'll send this along as a feature…
  • Thanks! The work to fix the API error reporting is in progress. Please work with support on your ticket for help with checking on the files themselves.
  • You can list files and folders using SwiftyDropbox via the listFolder and listFolderContinue methods. There's an example here. (That's showing some queue functionality, but that's optional.) You can download specific files using the paths to the files, e.g., as retrieved using the above, via the download method. There's an…
  • I don't believe we have any specific sample code for this, but you can construct a DropboxClient with a custom HttpClient which can include proxy settings: https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_DropboxClient__ctor_1.htm…
  • Yes, you can still use Dropbox Business API apps with the "team member file access" permission via the "member file access" feature to access any team-owned content, e.g., via /2/files/list_folder[/continue], etc., even without specifying a particular member with access. You should use the "Dropbox-API-Select-Admin" header…
  • If you mean you want to be able to get a zip download for a folder on Dropbox (like the /2/files/download_zip endpoint offers), but via a temporary link (like how the /2/files/get_temporary_link endpoint offers for files), no, unfortunately the Dropbox API doesn't offer that. I'll pass this along as a feature request, but…
  • If the file does get uploaded, fileUrlsToBatchResultEntries shouldn't be nil, so we'll be happy to help look into it. Is this is actual code you're running though, or was it edited for the post? I ask because it looks like you may be missing some curly brackets. Also, it looks like you're not using the propertyGroupArray…
  • @"Thomasbackdrops" Thanks for the feedback! I'll pass it along.
  • If the "entries" value is an empty list like you've shown here, it just means that there are no new entries to return for the cursor you supplied. (If the token or cursor were invalid, the API would respond with a specific error accordingly.) Note that if you go through the /2/files/list_folder results and save the cursor…
  • There isn't a single cursor for each user. A cursor is way to keep track of "where" you are in the file listing, so it is expected to change over time (and even just for each call) for each user. You should continuously update the latest cursor you received for each user. The first time you want to list the files and…
  • When you "create" a Dropbox API app on the Dropbox App Console, you're essentially just registering an app with us so that you can access the Dropbox API. Exactly where and how you write the code that does so is up to you, as is the UI for your app. For instance, if you're writing a project in .NET (say, in Visual Studio),…
  • You can find an example of setting a timeout with the .NET SDK here: https://github.com/dropbox/dropbox-sdk-dotnet/blob/master/dropbox-sdk-dotnet/Examples/SimpleTest/Program.cs#L64
  • The Dropbox OAuth app authorization flow supports the "token" and "code" flows. You can find the documentation here: https://www.dropbox.com/developers/documentation/http/documentation#authorization A redirect URI is required for the token flow, but not the code flow, so if you need to process the app authorization without…
  • Thanks for the additional information. From your description, it sounds like your web host would be your network administrator this case. It does sound like there's an issue with that particular web host, since your other ones are working, or at least a networking issue on the path between that particular web host and…