The Official Dropbox API V2 SDK for .NET
347
stars
291
commits
C#
primary language
Sep 11, 2026
updated
The official Dropbox SDK for DotNet.
Documentation can be found on GitHub Pages
Create an app via the Developer Console
Install via NuGet
PM> Install-Package Dropbox.Api
After installation, follow one of our Examples or read the Documentation.
You can also view our OAuth guide.
We provide Examples to help get you started with a lot of the basic functionality in the SDK.
For file upload calls whose request type includes ContentHash, the SDK automatically computes and sends a Dropbox content_hash when the upload stream is seekable. The server rejects the upload if the hash does not match the bytes it receives.
Because content_hash is part of the request header, this default-on validation reads the stream once to compute the hash, seeks back to the original position, and then reads it again for the upload body. That is two reads (2×) of I/O for seekable uploads. For local files the second read is often served from OS cache; for slow, network-backed, or encrypted streams it can materially increase upload time. Non-seekable streams are uploaded without automatic hashing. A manually supplied contentHash argument always wins. If a seekable stream has unusual read or rewind behavior, disable automatic hashing for that upload or client.
You can also compute a content hash yourself, for example to verify a downloaded file against its ContentHash metadata:
using Dropbox.Api.Files;
using (var stream = File.OpenRead("local-file.txt"))
{
var contentHash = ContentHasher.ComputeHash(stream);
// Compare against metadata.ContentHash returned by the server.
}
To disable automatic hashing for one upload, wrap the stream:
using Dropbox.Api.Files;
await client.Files.UploadAsync(
new UploadArg("/remote-file.txt"),
ContentHasher.WithoutAutoContentHash(stream));
To disable automatic hashing for a client:
var config = new DropboxClientConfig
{
AutoContentHash = false,
};
If you find a bug, please see CONTRIBUTING.md for information on how to report it.
If you need help that is not specific to this SDK, please reach out to Dropbox Support.
This SDK is distributed under the MIT license, please see LICENSE for more information.
C#
99.3%
The Official Dropbox API V2 SDK for .NET
347
stars
291
commits
C#
primary language
Sep 11, 2026
updated
The official Dropbox SDK for DotNet.
Documentation can be found on GitHub Pages
Create an app via the Developer Console
Install via NuGet
PM> Install-Package Dropbox.Api
After installation, follow one of our Examples or read the Documentation.
You can also view our OAuth guide.
We provide Examples to help get you started with a lot of the basic functionality in the SDK.
For file upload calls whose request type includes ContentHash, the SDK automatically computes and sends a Dropbox content_hash when the upload stream is seekable. The server rejects the upload if the hash does not match the bytes it receives.
Because content_hash is part of the request header, this default-on validation reads the stream once to compute the hash, seeks back to the original position, and then reads it again for the upload body. That is two reads (2×) of I/O for seekable uploads. For local files the second read is often served from OS cache; for slow, network-backed, or encrypted streams it can materially increase upload time. Non-seekable streams are uploaded without automatic hashing. A manually supplied contentHash argument always wins. If a seekable stream has unusual read or rewind behavior, disable automatic hashing for that upload or client.
You can also compute a content hash yourself, for example to verify a downloaded file against its ContentHash metadata:
using Dropbox.Api.Files;
using (var stream = File.OpenRead("local-file.txt"))
{
var contentHash = ContentHasher.ComputeHash(stream);
// Compare against metadata.ContentHash returned by the server.
}
To disable automatic hashing for one upload, wrap the stream:
using Dropbox.Api.Files;
await client.Files.UploadAsync(
new UploadArg("/remote-file.txt"),
ContentHasher.WithoutAutoContentHash(stream));
To disable automatic hashing for a client:
var config = new DropboxClientConfig
{
AutoContentHash = false,
};
If you find a bug, please see CONTRIBUTING.md for information on how to report it.
If you need help that is not specific to this SDK, please reach out to Dropbox Support.
This SDK is distributed under the MIT license, please see LICENSE for more information.
C#
99.3%