Greg-DB Dropbox Community Moderator

Comments

  • @"brian q." As Здравко, please check the source is still available at the time of the save call, as that would be typical cause of an error like that. Otherwise, feel free to open an API ticket with some additional details if you'd like us to look into it specifically. In particular, the account IDs for the source account…
  • Yes, the Dropbox API does offer the ability to retrieve the event log for a Dropbox team programmatically, via the /2/team_log/get_events[/continue] endpoints. You can find the documentation here: * https://www.dropbox.com/developers/documentation/http/teams#team_log-get_events *…
  • @"novotny" Yes, the expiration is only about the access token. The refresh token doesn't expire (though can be revoked on demand). If the expiration has passed, the client will use the refresh token to get a new access token automatically.
  • @"novotny" You can call refreshAccessToken if you want, but that is actually not necessary. The client will automatically handle this procedure for you whenever needed. (That is, it will automatically perform the refresh to get and use a new short-lived access token when the current one is expired, without you having to…
  • @"novotny" Regarding your initial authorization question, it is not possible to fully automate the OAuth process where the user chooses to authorize the app and the app then receives the resulting access token and optional refresh token. This needs to be done manually by the user at least once. If your app needs to…
  • @"1575475" Dropbox does not offer a way to check or sync with its own clock. I'd suggest you use whatever standard time synchronization service is available to you on your platform (e.g., using NTP). You can find the documentation for the date format that the Dropbox API uses here, and a guide about Detecting Changes here.
  • This doesn't appear to be something Dropbox itself is doing, but note that users can move app folders, e.g., via the web site or any Dropbox client. So, I recommend having the affected user check their account. If they didn't intentionally do it themselves, it's possible something connected to their account made it, e.g.,…
  • A 'missing_scope' error indicates that while the app is permitted to use that scope, the particular access token you're using to make the API call does not have that scope granted. Also, be aware that just adding a scope to your app via the App Console does not retroactively grant that scope to existing access tokens. That…
  • @"Здравко" Thanks for the detailed post! It looks like the issue is that the shared folder contains a nested shared folder, and so cannot be unshared. You would need to move the nested shared folder out first before you can unshare the parent shared folder. I'll ask the team to see if we can improve the error reporting in…
  • The API does have a rate limiting system, but if it needs to reject a call for rate limiting, it would return a 429, not a 409. 1. If it appears the API is incorrectly returning this error, please share the request and response, showing both headers and bodies, so we can take a look. Be sure to redact the access token…
  • The documentation doesn't indicate a specific sort order, so I can't guarantee if/how it will be sorted. I'll ask the team to document/guarantee a particular order, but I can't promise if/when that would be done. That being the case, I recommend applying whatever sorting you need client-side to be sure.
  • Apologies this isn't better documented; I'll ask the team to fix that up. When you get an async_job_id back from /2/sharing/remove_folder_member, you should call /2/sharing/check_job_status to see the result of the operation, e.g., if it completed successfully or if it failed and if so why. Please give that a try and let…
  • I see you're referring to using the /2/files/list_folder/get_latest_cursor endpoint. That endpoint allows you to get a cursor for listing a folder. That allows you to specify either a path in the connected account, or a shared link for a folder and optionally a path relative to that folder. The structure of your JSON looks…
  • The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. While it is technically possible to always connect to just one account for all users, we do not officially support this, for various technical and security reasons. If you just want to be…
  • @"1575475" Apologies for the lack of clarity here. For team folders in particular, you need to add members via groups; you can't add them individually. I'll ask the team to see if we can clarify this in the documentation and error response. For example, you would set the "members" parameter like:…
  • That particular error shouldn't indicate an API rate limit. I also just tried making repeated /2/sharing/get_shared_link_metadata calls with a correct password and this didn't reproduce for me. Can you double check you have the correct password in this case? If so, would you be able to share a sample that we can check on…
  • @"Ragindev" As Здравко noted, make sure you implement both /2/files/list_folder and /2/files/list_folder/continue. You're not guaranteed to get everything back in one call. Check out the linked documentation for more information. Also, if you're using a team account, note that the team may have recently switched to the…
  • @"1575475" As Здравко said, it would be helpful to see the actual request to troubleshoot this further. From your description though, are you trying to call /2/sharing/share_folder on the team folder itself, which you created using /2/team/team_folder/create? You don't need to "share" a team folder, since it is already…
  • The app key and app secret, also known as client ID and secret, identify the app itself, not any particular account, and do not themselves enable access to any account. The OAuth app authorization flow is a way for arbitrary end-users to allow apps to connect to their accounts. It is not possible to fully automate the…
  • 1. As you found, there is a specific limit for uploads to some Dropbox Business team plans of "1 billion API calls/month" for "data transport" . This is a limit on the number of upload API calls that can be made per team per month, for certain Dropbox Business team plans only. This only applies to upload calls, and not…
  • @"purringpigeon" Здравко is correct, you should use the "mode" option to control this behavior. That's still available in the latest version of the SDK, as seen here. I recommend using Xcode's autocomplete feature to automatically template out the parameters.
  • @"Omri1984" It sounds like there's an issue with the credentials you're supplying, so trying the call outside of the SDK as Здравко suggested should be a useful test.
  • While the Dropbox API doesn't offer a way to upload an entire folder including its contents at once, you can create a folder using /2/files/create_folder_v2, and as Здравко noted, you can upload files using /2/files/upload.
  • It's not possible to make new access tokens long-lived; for long-term access without manually re-authorizing the app, you would use refresh tokens. Refresh tokens don't expire automatically and can be used to programmatically retrieve new short-lived access tokens whenever needed. For examples of implementing this with the…
  • Dropbox está en proceso de cambiar para emitir solo tokens de acceso de corta duración (y tokens de actualización opcionales) en lugar de tokens de acceso de larga duración. Puede encontrar más información sobre esta migración aquí . Sin embargo, las aplicaciones aún pueden obtener acceso a largo plazo solicitando acceso…
  • It looks like that's an error from CocoaPods itself so I can't really offer support for that, but it looks like there's a post about that error here.
  • The code you pass to getAccessTokenFromCode is an "authorization code". Authorization codes are only valid for a short period time, and can each only be used once. Once you use the authorization code to retrieve an access token and optionally a refresh token, you can no longer use that authorization code again. You should…
  • Try adding this error handling to the getAccessTokenFromCode call to get a more specific error message from the error response: .catch(function(error) { console.error(error.status); console.error(error.error); });
  • @"1575475" It looks like you have the right idea. And for reference, here's a curl example of calling /2/sharing/share_folder with the 'Dropbox-Api-Select-Admin' header specified: (built using the API v2 Explorer) curl -X POST https://api.dropboxapi.com/2/sharing/share_folder \ --header 'Authorization: Bearer…