Greg-DB Dropbox Community Moderator

Comments

  • The /2/files/search_v2 documentation currently says: Recent changes may not immediately be reflected in search results due to a short delay in indexing. Duplicate results may be returned across pages. Some results may not be returned. I can't promise if/when that may be updated, but I'll pass this along as a feature…
  • The page size returned by ListFolderAsync and ListFolderContinueAsync is not guaranteed. Even if there is currently only a relatively small number of folders, the exact number of calls needed may vary, so you need to make sure you're calling back whenever HasMore is true, and checking the contents of each page. Beyond…
  • You need to check HasMore on each result, including from ListFolderContinueAsync, not just the first one. The number of total pages that will be used is not guaranteed. Also, you should use the contents of each returned page of results. In this latest code it looks like you're only iterating through the contents of the…
  • For example, where authUrl is the URL you got from getAuthenticationUrl, you can modify it like this: var url = new URL(authUrl);var urlParams = new URLSearchParams(url.search);urlParams.set('force_reapprove', 'true');url.search = urlParams;console.log(url.href);
  • What version of 'dropbox' did you install, and how did you install it? Also, why is it 'dropbox_new' instead of just 'dropbox'? You should ideally install the latest version, via npm, and then not manually pass in the fetch yourself. See here for a note on…
  • The results from /2/files/search_v2 aren't always exhaustive unfortunately, but we can check on this internally if you'd like. It'd best if you open an API ticket if so, preferably while signed in to the relevant account if possible (if it's one you control). Thanks!
  • Is the ListFolderResult.HasMore returned by ListFolderAsync set to true? If so, you need to call back to ListFolderContinueAsync to retrieve more results. Please refer to the ListFolderAsync documentation for more information.
  • Thanks for writing this up! Yes, this is already open on GitHub so I'll follow up with you there.
  • Apologies for the trouble. It looks like there's an issue with the routing for that page when using a non-English locale. We'll look into it. For now, please try accessing https://www.dropbox.com/lp/developers/reference/oauth-guide while not signed in to Dropbox, such as in an incognito window.
  • I've moved your comment to its own thread since it's no longer related to the original thread. How did you install the Dropbox library, and how are you setting up your client object?
  • That's correct, that parameter isn't currently implemented in the Dropbox JavaScript SDK, but I'll be sure to pass this along as a feature request. You can add it to the /oauth2/authorize URL in your app's own code though, by modifying the URL returned by getAuthenticationUrl.
  • It sounds like you're referring to calling /2/sharing/get_file_metadata, and in some cases get the 'access_error.inside_osx_package' error back. Dropbox doesn't allow sharing these files like this (e.g., via /2/sharing/add_file_member) anyway, so there wouldn't be shared file metadata to return. We don't have documentation…
  • You can get a refresh token via the OAuth app authorization flow and store and re-use that server-side without any further manual user interaction if you wish. As for the short-lived access token you're getting, it sounds like you may be using the "Generate" button. That only enables you to easily get access tokens, not…
  • If you're signed in to an account that has already authorized the app, you may not be explicitly asked to authorize it again, and may instead just be redirected through the flow automatically. Check out the 'force_reapprove' parameter on /oauth2/authorize.
  • @"robertoandrade" Commenting here serves that purpose. Thanks!
  • @"bffy_smmmers" You should use .then and .catch to handle the result/error, like this: dbx.filesGetThumbnail({path: path}) .then(function(response) { console.log("got filesGetThumbnail response:"); console.log(response); console.log("got thumbnail data:"); console.log(response.fileBlob); }) .catch(function(error) {…
  • That's correct, please give it a try and let us know if you run in to any issues or have any questions. Thanks!
  • @"bffy_smmmers" The filesListFolder method doesn't return any file data or shared links. It only returns file metadata. The Dropbox API also doesn't return thumbnail links in general. If you want the original file data, you should call filesDownload. If you want a thumbnail of an image file, you should…
  • Yes, for the offset on the /finish call for a concurrent upload session you should supply the total number of bytes successfully sent for the session previously (i.e., the total length of the file).
  • Dropbox API calls operate in the member folder by default, not the team space, but you can access the team space when desired. To do so, you'll need to specify an additional header to configure that. Please refer to the Team Files Guide for information on how to do so:…
  • The Dropbox API does not block IP addresses, so this is likely a networking issue. Were you able to check if there's any proxy, firewall, etc. that may be interfering? 
  • @"kevin g.1" No, unfortunately the cases for when the existing shared link metadata will or will not be returned are not documented/guaranteed.
  • By default, upload sessions only accept the data sequentially, meaning the app needs to only upload the pieces of the file for an upload session one by one in order. You can upload in parallel if you want, but you need to set session_type:concurrent and follow a few other constraints. Please refer to…
  • @"kevin g.1" It's not possible to recreate the sharing_create_shared_link behavior with sharing_create_shared_link_with_settings exactly, but in some cases the API will return the existing shared link metadata in the SharedLinkAlreadyExistsMetadata in the CreateSharedLinkWithSettingsError, which you can get…
  • @"bffy_smmmers" Those examples happen to use sharingGetSharedLinkFile, which is a way to retrieve file data from a shared link. That's just an example though, and may not be the right method for your own use case, such as if you're not working from a shared link to begin with. There are other methods for other use cases,…
  • No, unfortunately there currently isn't a way to revoke only the short-lived access token and not any corresponding refresh token, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 
  • If you will not need to link more than 50 users to your app, you do not need to apply for production. Note that the "development" versus "production" status of your app does not affect the expiration of access tokens for your app. Regardless of the status of your app, you can currently use either short-lived or long-lived…
  • @"Chris Chris" There's no news on this request unfortunately.
  • The Dropbox API unfortunately doesn't return the created/modified date for folders, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 
  • The Dropbox API does not block IP addresses or timeout requests intentionally. If/when the Dropbox API rejects a request, Dropbox will return an explicit error response. I'm also not clear on what you mean when you say the request timed out, but you received a 499 status code. The status code would be in the response, but…