Greg-DB Dropbox Community Moderator

Comments

  • @"9krausec" I posted a sample here that may be useful. Hope this helps!
  • You can find examples in the authorization documentation, such as how the authorization URL should be formed for /oauth2/authorize, as well as how calls to /oauth2/token would be made using curl.
  • @"vewert" Yes, that's correct. The the "Access token expiration" setting in the App Console is essentially a setting that controls the default behavior when token_access_type is not specifically set by the app during the authorization flow. The startOAuth2PKCE does set that though, so it will still return a short-lived…
  • Using the Dropbox API v2 Python SDK, you should be able to use the sharing_get_shared_link_metadata and sharing_get_shared_link_file/sharing_get_shared_link_file_to_file methods to get the metadata and file data, respectively, from a shared link, as long as the links settings allow it (e.g., it's publicly accessible), even…
  • @"vewert" No, just using the startOAuth2PKCE method will not change the "Access token expiration" setting in the App Console for any of your apps.
  • @"ppciesiolkiewicz" The Dropbox API doesn't offer a way to programmatically upload to an actual file request, but it does offer functionality that would enable you to build something like that. You would want to call /2/files/get_temporary_upload_link on your server and pass the resulting temporary upload link(s) down the…
  • You can create and use multiple short-lived access tokens for the same app-user pair at the same time. Creating a new one doesn't invalidate previous ones.
  • Are you using an app key for an app that hasn't been migrated to scopes yet? This can occur if so. (Apologies for the unhelpful error messages!) In order to set scopes during the app authorization flow like this, you'll need to use an app key for an app that is set to use scopes.
  • It looks like you're running the app authorization flow through a web view. Unfortunately, this is prone to compatibility issues with the Dropbox web site, as the browser engine used by web views like this tend to not get updated and break as web sites are updated. I recommend updating your app to send the app…
  • Long-lived access tokens and short-lived access tokens both work the same way, just with the exception that short-lived access tokens expire after a few hours, while long-lived access tokens don't. Otherwise, they serve the same purpose. That is, they each identify a particular app-account pair, and enable access to that…
  • Short-lived access tokens only last for a few hours, so if you need long-term access, you'd also need to plug in a refresh token. The refresh token can be used to get new short-lived access tokens on demand, without further manual interaction. The App Console doesn't offer the ability to get refresh tokens though, so you'd…
  • Unfortunately, "XBrowser" is not an officially supported browser for the Dropbox web site. You can find the list of supported browsers and versions for dropbox.com here. I'm afraid we can't offer support for any browsers/versions not on that list.
  • @"thesongcompany" Apologies for the confusion. I was referring to the "Prevent Cross-Site Tracking" setting in Settings.app > Safari. Can you check that? It may also be easier if you can share a URL of a page where the Embedder isn't working for you. Feel free to open an API ticket if you'd prefer to share privately.…
  • Thanks for the notes! I'll pass them along.
  • The team has updated the SDK to no longer set 'contents' as required in the latest JavaScript SDK version, v9.7.0, so you should be able to use this as expected without the workaround now.
  • Dropbox unfortunately doesn't offer a way to programmatically upload to file requests like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
  • Thanks for sharing this. You can find the current policy in the /oauth2/authorize documentation. This is in place for the sake of compatibility, as well as to comply with Google's policy for their sign in flow, which Dropbox offers as an authentication option. I shared an example of how one might implement this in a UWP…
  • While our sample does run a local server using npm/node, npm/node is not the only option. You have your choice of server for your own app. You don't need to use npm/node in particle to integrate with the Dropbox API using the JavaScript SDK in the browser. Also, the new authorization system does not actually change the…
  • @"thesongcompany" To clarify, I'm not referring to which method of using the Embedder (anchor or JavaScript) you're using, but rather if you're putting the Embedder inside an iframe on your page. (That could be done via either method.) Also, please let me know if you have "Prevent Cross-Site Tracking" enabled. Thanks!
  • @"thesongcompany" Are you putting the Embedder inside an iframe in this case, and do you have "Prevent Cross-Site Tracking" enabled?
  • I'm not sure I totally understand your latest message. Can you elaborate on what you currently need help with? What exactly are you currently trying to do and what are you stuck on? (Even if you can't run the new example via a local server, it can still serve as a reference for the JavaScript code you would need to run to…
  • @"MarteIT" The 'redirect_uri' value you supply to /oauth2/token, if any, should exactly match the 'redirect_uri' value supplied to /oauth2/authorize, if any, when that particular authorization code was retrieved. If they don't match, you'll get this error. The https://www.dropbox.com/1/oauth2/display_token page is a basic…
  • @"James_T" 1-6. Thanks for all the feedback! I'm sending this along to the team. 7. I see you opened a new thread for this, so I'll follow up with you there.
  • Yes, you can continue using the existing legacy functionality/permissions until then.
  • The Dropbox API does have a rate limiting system that can result in 'too_many_requests' errors like this. The Performance Guide you linked to has guidance on how to best upload multiple files, but in any case you'll want to make sure your code can catch handle these sorts of error responses at any time. When you get one,…
  • @"MarteIT" To exchange or "swap" the authorization code for an access token and refresh token you should use "grant_type=authorization_code", as shown in the "access token request in code flow" example (or "PKCE code flow token request" example, if using PKCE) in the /oauth2/token documentation. Using…
  • @"MarteIT" By "swap", Taylor was referring to how the app sends the "authorization code" (which is received from the /oauth2/authorize OAuth step) in the request to the Dropbox /oauth2/token endpoint, and how the Dropbox API would send the access token and refresh token back in the response. I recommend reading the OAuth…
  • @"diwakergupta" wrote:* How do I get metadata for a Paper doc? I tried getting list of `doc_ids` from `paper_docs_list`, but then a subsequent call to `files_get_metadata` fails with path not found (I'm setting `path` to `id:<doc_id>` from the above call). For any given Paper doc, you shouldn't use both legacy "paper"…
  • The path, "/test" in your code here, should be referring to the path of the file or folder in the Dropbox account, not related to the location of the code you're running. I recommend reading the File Access Guide for reference.
  • Yes, you can use the Dropbox API to automate the creation of shared links. For Python, we recommend using the official Dropbox API v2 Python SDK: https://github.com/dropbox/dropbox-sdk-python With that, you can use the sharing_create_shared_link_with_settings method to create a shared link for any file or folder:…