Your workflow is unique 👨💻 - tell us how you use Dropbox here.
API
5868 TopicsAPI App on PHPBB dropbox upload extention
HI I created an app on Dropbox api to used the PHPBB Dropbox extention and after i set it up on my phpbb broad it shows dropbox fail to upload and give this in the error log Dropbox returned the error » {"error_summary": "invalid_access_token/.", "error": {".tag": "invalid_access_token"}} any suggestions on how to fix thatDoes the hosted MCP server at mcp.dropbox.com expose any file write tools (upload, create, delete)?
This information is not required, but it makes it easier for our Community members and support team to help you. Application Affected Claude AI > Dropbox via mcp.dropbox.com Question or Issue Does the hosted MCP server at mcp.dropbox.com expose any file write tools (upload, create, delete)? If not, is that on the roadmap? I have 'files.content.write' checked under individual scopes but my connector can only seem to read and not save files.135Views0likes6CommentsCopy files from individual folder to team folder
Hi, Im trying to copy files from individual folder to a team folder by using https://api.dropboxapi.com/2/files/copy_v2 However, im receiving error from_lookup/not_found/. I tried to include Dropbox-Api-Select-Admin but i didnt work. I also try to copy files within team folder but it doesnt work. Can anyone help me with this issue?sharing/list_file_members do NOT return time_last_seen of members
Hi! I'm trying to use the sharing/list_file_members in order to fetch the last time a shared file have been seen by its member. According to the API, the response for each member should include the field time_last_seen, in case the member have opened the file. However, it does not matter if members have opened it or not, the field is not being returned at all in the response. Am I missing anything? This is the API I'm doing: curl -X POST "https://api.dropboxapi.com/2/sharing/list_file_members" --header "Content-Type: application/json" \ --header "Authorization: Bearer <AUTH_TOKEN>" --header "Dropbox-API-Select-User: <USER_ID>" --data "{\"file\": \"<FILE_ID\"}"772Views0likes5CommentsDo I need to request production status?
Hey guys, I've built a workflow in N8N that stores files and creates shareable links. If I'm going to share the links with 300-500 people per month, do I need to request production status? Note that most of the people who will receive the link don't have a Dropbox account(If not all of them)Solved/files/save_url has high rate of failure
Hi, I am currently testing using the /files/save_url API endpoint and am experiencing a high rate of failure. I am testing using a set of 6 small image files stored in S3-compatible storage environments, and using their public URLs with the aforementioned API endpoint. In every test run, there is at least one file that fails to be created in Dropbox, and it is a different file from the set each time. A file that fails in test #1 will succeed in tests #2, #3 and fail again in test #4 etc. These image files are standard .jpg files and generally 500kb or less. Upon checking the status of the API requests using /files/save_url/check_job_status, the failed IDs return the "download_failed" response. I know there is a 5 minute limit on file transfers using /files/save_url, however all these failed IDs are returning their failure response only a few seconds after initiating the API request. It may be worth mentioning that the API requests to /files/save_url are occurring all together. I don't believe the URLs are being rate-limited on the S3-compatible storage side, as it is tested with multiple environments, including self-hosted storage without such restrictions. Done some googling, found some users with the same issue, but unable to find anything that resolves the issue. Some example failed job IDs: nJekCKfZPnwAAAAAAAAAAQ aPQH1k_ei7cAAAAAAAAAAQ Is there a way to resolve this issue?1.6KViews0likes14CommentsUsing API and SDK together
Hello, I need some help until now i have been using >NET SDK Version 6.37. and we are experiencing a problem downloading large files 30GB and higher. so I tried to implement chunk download, but SDK does not support it . so I did it using the API. but my problem is that when we use the SDK we do not Need to refresh token. and when we use api after some time I am getting 401 . so I implemented a refresh token method, and refreshed the token , but still after sending the request again with the new token I got I am still getting the 401. I tried to get the token from the Dropbox Client but it is not there also regarding the refresh token , is this token always stays the same ? can some one help? adding some code snipped. public async Task<string> RefreshAccessTokenAsync(string expiredAccessToken,BaseRequest baserRequest,bool isBusinessClient, CancellationToken token) { using (var http = new HttpClient()) { var request = new HttpRequestMessage(HttpMethod.Post, "https://api.dropboxapi.com/oauth2/token"); var content = new FormUrlEncodedContent(new Dictionary<string, string> { { "grant_type", "refresh_token" }, { "refresh_token", baserRequest.RefreshToken }, { "client_id", isBusinessClient ?ClientIdBusiness : ClientId }, { "client_secret", isBusinessClient ? ClientSecretBusiness : ClientSecret } }); request.Content = content; using (var response = await http.SendAsync(request, token)) { response.EnsureSuccessStatusCode(); var json = await response.Content.ReadAsStringAsync(); dynamic result = Newtonsoft.Json.JsonConvert.DeserializeObject(json); string newAccessToken = result.access_token; if (string.IsNullOrEmpty(newAccessToken)) throw new Exception("Dropbox token refresh failed: access_token not returned."); return newAccessToken; } } } private async Task DownloadFileInChunksHttpAsync( string accessToken, string dropboxPath, string localPath, long fileSize, string asMember, string rootNamespaceId, CancellationToken token, BaseRequest baseRequest, bool isBusinessClient) // <-- tells refresh which client to use { DropboxTeamClient client; const int bufferSize = 1024 * 1024; // 1MB const long chunkSize = 50L * 1024 * 1024; // 50MB using (var fileStream = new FileStream(localPath, FileMode.Create, FileAccess.Write, FileShare.None)) using (var http = new HttpClient()) { string currentAccessToken = accessToken; long offset = 0; while (offset < fileSize) { long end = Math.Min(offset + chunkSize - 1, fileSize - 1); bool retriedAfterRefresh = false; RetryChunk: var request = new HttpRequestMessage(HttpMethod.Post, "https://content.dropboxapi.com/2/files/download"); // Authorization request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", currentAccessToken); // Dropbox-API-Arg (JSON-encoded) var arg = new { path = dropboxPath }; string jsonArg = Newtonsoft.Json.JsonConvert.SerializeObject(arg); request.Headers.Add("Dropbox-API-Arg", jsonArg); // Range header for chunking request.Headers.Range = new System.Net.Http.Headers.RangeHeaderValue(offset, end); // Act as team member (Business) if (!string.IsNullOrEmpty(asMember)) request.Headers.Add("Dropbox-API-Select-User", asMember); // Apply PathRoot (WithPathRoot) for Business only if (!string.IsNullOrEmpty(rootNamespaceId)) { var pathRoot = new Dictionary<string, object> { { ".tag", "root" }, { "root", rootNamespaceId } }; string jsonPathRoot = Newtonsoft.Json.JsonConvert.SerializeObject(pathRoot); request.Headers.Add("Dropbox-API-Path-Root", jsonPathRoot); } using (var response = await http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, token)) { // 🔐 Handle expired token (401) if (response.StatusCode == System.Net.HttpStatusCode.Unauthorized) { if (retriedAfterRefresh) { var err = await response.Content.ReadAsStringAsync(); throw new HttpRequestException( $"Dropbox download failed after token refresh (401). Body: {err}"); } // Refresh token based on client type (Personal vs Business) currentAccessToken = await RefreshAccessTokenAsync(currentAccessToken, baseRequest, isBusinessClient, token).ConfigureAwait(false); retriedAfterRefresh = true; goto RetryChunk; } // ❌ Other errors if (!response.IsSuccessStatusCode) { var err = await response.Content.ReadAsStringAsync(); throw new HttpRequestException( $"Dropbox download failed: {(int)response.StatusCode} {response.ReasonPhrase}. Body: {err}"); } // ✅ Success using (var stream = await response.Content.ReadAsStreamAsync()) { fileStream.Seek(offset, SeekOrigin.Begin); await stream.CopyToAsync(fileStream, bufferSize, token); } } offset = end + 1; } } } public async Task<DownloadFileResponse> DownloadFileAsync(DownloadFileRequest request) { DropboxTeamClient client; var connectionId = GetDropboxTeamClient(request, out client); ////logsfodebug(request, "DownloadFileAsync"); var account = await client.AsMember(request.AsMember).Users.GetCurrentAccountAsync(); var spaceclient = client.AsMember(request.AsMember).WithPathRoot(new PathRoot.Root(account.RootInfo.RootNamespaceId)); bool newTeam = CheckIfUserIsUpdatedTeam(account); string tempFilename; if (request.ExportAs != null) { // ===== EXPORT: REVERTED TO OLD SDK CODE (AS REQUESTED) ===== tempFilename = await Retries.PerformWithRetriesAsync( async () => { var path = request.FilePath.Replace('\\', '/'); var fileInfo = await spaceclient.Files.GetMetadataAsync(path) .ConfigureAwait(false); if (fileInfo.IsDeleted) throw new CannotDownloadFileException(string.Format("File was Deleted. - {0}", path)); long? size = request.Size ?? (long)fileInfo.AsFile.Size; using (var safeTemporaryFileProvider = new SafeTemporaryFileProvider(() => PathExtensions.GetTempFileName(request.ContextId))) { using (var tokenSource = new CancellationTokenSource(TimeoutHelper.FromSize(size))) { // OLD SDK EXPORT CODE (unchanged) using (var downloadResponse = await spaceclient.Files .ExportAsync(new ExportArg(request.FilePath, null)) .WithCancellation(tokenSource.Token).ConfigureAwait(false)) { using (var fileStream = new FileStream(safeTemporaryFileProvider.TempFilename, FileMode.Create)) { var downloadStream = await downloadResponse.GetContentAsStreamAsync() .WithCancellation(tokenSource.Token) .ConfigureAwait(false); await downloadStream.CopyToAsync(fileStream, 4096, tokenSource.Token) .WithCancellation(tokenSource.Token) .ConfigureAwait(false); return safeTemporaryFileProvider.TempFilename; } } } } }, ShouldRetryWithDelay).ConfigureAwait(false); } else { if (newTeam) { // ===== BUSINESS / TEAM: NEW HTTP CHUNKED DOWNLOAD ===== tempFilename = await Retries.PerformWithRetriesAsync( async () => { var path = request.FilePath.Replace('\\', '/'); var fileInfo = await spaceclient.Files.GetMetadataAsync(path).ConfigureAwait(false); if (fileInfo.IsDeleted) throw new CannotDownloadFileException(string.Format("File was Deleted. - {0}", path)); long? size = request.Size ?? (long)fileInfo.AsFile.Size; using (var safeTemporaryFileProvider = new SafeTemporaryFileProvider(() => PathExtensions.GetTempFileName(request.ContextId))) { using (var tokenSource = new CancellationTokenSource(TimeoutHelper.FromSize(size))) { await DownloadFileInChunksHttpAsync( request.AccessToken, path, safeTemporaryFileProvider.TempFilename, size ?? 0, request.AsMember, account.RootInfo.RootNamespaceId, tokenSource.Token, request, true); // <-- Business client return safeTemporaryFileProvider.TempFilename; } } }, ShouldRetryWithDelay).ConfigureAwait(false); } else { // ===== PERSONAL: NEW HTTP CHUNKED DOWNLOAD ===== tempFilename = await Retries.PerformWithRetriesAsync( async () => { var path = request.FilePath.Replace('\\', '/'); var fileInfo = await client.AsMember(request.AsMember).Files.GetMetadataAsync(path).ConfigureAwait(false); if (fileInfo.IsDeleted) throw new CannotDownloadFileException(string.Format("File was Deleted. - {0}", path)); long? size = request.Size ?? (long)fileInfo.AsFile.Size; using (var safeTemporaryFileProvider = new SafeTemporaryFileProvider(() => PathExtensions.GetTempFileName(request.ContextId))) { using (var tokenSource = new CancellationTokenSource(TimeoutHelper.FromSize(size))) { await DownloadFileInChunksHttpAsync( request.AccessToken, path, safeTemporaryFileProvider.TempFilename, size ?? 0, request.AsMember, null, tokenSource.Token, request, false); // <-- Personal client return safeTemporaryFileProvider.TempFilename; } } }, ShouldRetryWithDelay).ConfigureAwait(false); } } var response = new DownloadFileResponse { LocalPath = tempFilename }; return UpdateTokens(response, request, client, connectionId); }228Views0likes7Commentslist_folder is not returning media info
I am sending a request using this endpoint: https://api.dropboxapi.com/2/files/list_folder And sending this data: { "path": "/Otter+Moon", "include_media_info": true, "include_has_explicit_shared_members": false, "include_mounted_folders": true } However, the media info is not being returned. This means that I have to send individual https://api.dropboxapi.com/2/files/get_metadata { "path": "/Otter+Moon/EmmaWolf_OtterandMoon-1.jpg", "include_media_info": true } for each file in that directory. Why? Why is the media info not being returned on the initial request?150Views0likes5CommentsReceiving errors from Dropbox API
Hello we've had intermittent issues with the Dropbox API, where some users within our org are unable to upload pictures or docs. In our Kibana logging we are seeing this error occur: :Error= com.dropbox.core.NetworkIOException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target We are trying to narrow down why is error is occurring and if you need any additional info about our config please let me know.Solved459Views0likes5Comments