Greg-DB Dropbox Community Moderator

Comments

  • The Dropbox API doesn't offer a way to get/construct the URL of a file on the Dropbox web site (like with "/home") exactly, but you can call /2/sharing/create_shared_link_with_settings with the 'path' set to the the file/folder, and 'settings.audience' to 'no_one' to get a shared link that would refer to the folder on the…
  • @"Babaraba Abdabi" Thanks for the feedback!
  • There are a number of scenarios that can cause the refresh to fail like this, such as: * missing/incorrect/malformed refresh token * revoked refresh token (e.g., when the user unlinks the app via https://www.dropbox.com/account/connected_apps , etc.) * missing/incorrect/malformed app key * incorrect/malformed app secret *…
  • Yes, the Dropbox API and .NET SDK do support refresh tokens. That sample requests "offline" access to get a refresh token in this line, the refresh token is received here, and the refresh token is used to make a client here. The client will perform the refresh process using the supplied refresh token automatically.
  • @"terryz" I'm glad to hear you got this working! When starting from a /s/...?dl=1 link, there may be multiple redirects that need to be followed, which the client would handle do by issuing multiple requests. A 400 error response indicates that that particular request (that is, the one to which the response is sent) was…
  • A 400 like that indicates that there was something incorrect about the HTTP request issued by the client. (When following the redirects from the original link, there would be multiple requests made.) For example, as we found it seems the client is incorrectly sending the fragment ("#") on that particular link. Ultimately,…
  • @"terryz" Other clients/browsers support the ability to correctly handle redirects as well as withhold the "fragment" portion of the URL (the "#" part) when sending requests. These enable them to go from the original URL through to the final URL where the file data is returned. Based on what I've seen in this thread it…
  • @"rahulj1" Please review my previous message. In order to access the team space, you'll need to set the "Dropbox-API-Path-Root" header, which can be done in the Python SDK using the with_path_root method. In your latest code, you still don't seem to be using the "Dropbox-API-Path-Root" header or with_path_root method.…
  • Thanks for following up. I've also tried with the latest version of Google Chrome but the issue still doesn't reproduce for me. Are you perhaps using an old/invalid web session? Please try signing out and signing back in to Dropbox and then refresh the https://www.dropbox.com/developers/apps/create page and try again.…
  • Thanks for the report. I just tried this out myself and I'm not getting that error. If you're still seeing this issue, can you let me know which browser you're using and the version number of the browser?
  • @"terryz" Can you double check that you only removed the "#" and did not otherwise modify the link? I can't reproduce that 404 with curl. Also, note that these /cd/0/get/ links that result from the redirects can each only be used once, so you'd need to receive the link and remove the trailing "#" before you issue a request…
  • I see you're trying to access the contents of a folder in your "team space". By default, API calls operate in the "member folder" of the connected account, not the "team space". You can configure API calls to operate in the "team space" instead though. To do so, you'll need to set the "Dropbox-API-Path-Root" header. You…
  • @"terryz" That particular link has expired now (and so fails with a 410), but I notice it does end with a "#". That would normally be fine, as network clients are supposed to automatically remove that before issuing a network request (curl does, for example), but it's possible that your network client is not doing so, and…
  • @"Avielos" When uploading a file, a 'path/conflict/file' error like this indicates that the upload failed because there was already a file at the specified path. That can occur whether or not the file is "locked". You can find more information about this particular error, as well as the others, in the documentation. You…
    in File lock Comment by Greg-DB June 2023
  • @"Alex_Ch" You do not need call refreshAccessToken yourself, unless you need to retrieve a client with a sub-set of the authorized scopes. The SDK will automatically perform the refresh process for you automatically for the currently authorized scopes without you calling refreshAccessToken in your own code. If you do want…
  • This should be working properly now. Please let us know if you're still seeing any issues.
  • Dropbox doesn't limit the number of OAuth 2 redirect URIs or Chooser / Saver / Embedder domains that you can register (though it's not expected that developers would need to register very large numbers of these per app).
  • This should be fixed now. Please let us know if you're still seeing any issues. Thanks!
  • Thanks for the report! We're looking into it and I'll follow up here once I have an update on this.
  • Thanks for the feedback! I'll pass this along to the team to see if we can have those kinds of failures not return HTML to API clients, but I can't promise if or when that might be done.
  • A 503 error like that can indicate a general service availability issue. That should be transient and resolve after a short period of time. Depending on the particular kind of failure on the Dropbox infrastructure, you may see the response body take different forms like this. Regardless, when you receive a response with a…
  • @"sydneyfr" Здравко is correct; Dropbox is now issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. Short-lived access tokens expire after a short period of time, so you'd receive a 401 expired_access_token error when attempting to use a short-lived access token that has…
  • @"Alex_Ch" When using the OAuth app authorization flow, Dropbox gives an "authorization code" (sometimes also called "access code") that can be exchanged (once) for the access token and optional refresh token. As Здравко said, that resulting refresh token can then be used to retrieve further access tokens as needed.…
  • @"Tech Dev Oldsmar" I don't have any news on the original feature request here. If the info.json that Здравко mentioned would be helpful though, you can find information on that here.
  • @"rahulj1" To list the contents of a folder using the Dropbox Python SDK, you would use the files_list_folder and files_list_folder_continue methods. A "path/not_found" Dropbox API error indicates that there was nothing currently found at the specified path in the connected account. For example, this can happen if there's…
  • There's currently an issue that makes that "Submit" button appear white/greyed out and hard to see when making scope changes, but that button is still there and should be functional. As Здравко said though, based on the error you're getting, the issue is that you're attempting to combine team and user scopes, but without…
  • Thanks for submitting that. The team will review your ticket and follow up with you there.
  • @"Alex_Ch" It is not possible to "pre-generate" the refresh token. A refresh token can only be retrieved by authorizing the app using the app authorization flow. The refresh token doesn't expire though, so that only needs to be done once per Dropbox account (though the refresh token can be revoked on demand).
  • @"Hchauhan" The Dropbox API does not currently support directly listing the contents of a deleted folder, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. To work around that, you would need to either use the metadata you had previously retrieved from the API…
  • Thanks for the report. We'll look into it and I'll follow up here once I have an update.