Doppler.SDK
0.1.0-preview.1
dotnet add package Doppler.SDK --version 0.1.0-preview.1
NuGet\Install-Package Doppler.SDK -Version 0.1.0-preview.1
<PackageReference Include="Doppler.SDK" Version="0.1.0-preview.1" />
<PackageVersion Include="Doppler.SDK" Version="0.1.0-preview.1" />
<PackageReference Include="Doppler.SDK" />
paket add Doppler.SDK --version 0.1.0-preview.1
#r "nuget: Doppler.SDK, 0.1.0-preview.1"
#:package Doppler.SDK@0.1.0-preview.1
#addin nuget:?package=Doppler.SDK&version=0.1.0-preview.1&prerelease
#tool nuget:?package=Doppler.SDK&version=0.1.0-preview.1&prerelease
Doppler.SDK
Doppler.SDK is an idiomatic C# preview SDK for the Doppler API. It targets netstandard2.0, uses HttpClient, and mirrors the public service/method surface of Doppler's Node SDK.
Install
dotnet add package Doppler.SDK --version 0.1.0-preview
Get a Doppler Token
For applications that only need to read secrets from one project/config, create a Doppler Service Token:
- Open the Doppler dashboard.
- Go to the project and select the config your app should read from.
- Open the Access tab.
- Click Generate.
- Name the token, optionally set expiration or write access, then click Generate Service Token.
- Copy the token immediately. Doppler only shows it once.
You can also create one with the Doppler CLI:
doppler configs tokens create --project your-project --config your-config token-name --plain
Use that token as the SDK access token:
using var doppler = new DopplerClient(Environment.GetEnvironmentVariable("DOPPLER_TOKEN"));
Service Tokens are the recommended production default for secret reads because they are scoped to a single config. For broader API management workflows, such as creating projects, managing users, or calling workplace-level endpoints, use a Doppler Service Account API Token or another token with the required permissions.
Quickstart
using Doppler;
using var doppler = new DopplerClient("dp.xx.yyy");
var projects = await doppler.Projects.ListAsync(new DopplerRequestParameters
{
["page"] = 1,
["perPage"] = 20
});
Console.WriteLine(projects);
Configuration
Inject your own HttpClient when you manage connection lifetime elsewhere:
var httpClient = new HttpClient();
using var doppler = new DopplerClient("dp.xx.yyy", httpClient);
Override the API host for testing:
doppler.SetBaseUrl("https://api.doppler.com");
Update the token after construction:
doppler.SetAccessToken("dp.xx.yyy");
Secrets
var secrets = await doppler.Secrets.DownloadAsync(
project: "backend",
configName: "prd",
optionalParams: new DopplerRequestParameters
{
["format"] = "json",
["includeDynamicSecrets"] = true
});
Error Handling
try
{
await doppler.Projects.GetAsync("backend");
}
catch (DopplerApiException ex)
{
Console.Error.WriteLine($"{(int)ex.StatusCode}: {ex.Message}");
Console.Error.WriteLine(ex.ResponseBody);
}
Service Parity
The service surface is generated from DopplerHQ/node-sdk and audited in docs/service-parity.md. Responses are returned as JsonElement in this preview so the SDK can expose the full API before typed model generation is finalized.
Development
This repository uses the x64 .NET SDK through its absolute path on this machine:
& 'C:\Program Files\dotnet\dotnet.exe' restore
& 'C:\Program Files\dotnet\dotnet.exe' build
& 'C:\Program Files\dotnet\dotnet.exe' test
& 'C:\Program Files\dotnet\dotnet.exe' pack src\Doppler.SDK\Doppler.SDK.csproj
Optional live checks should be gated by environment variables:
$env:DOPPLER_ACCESS_TOKEN = 'dp.xx.yyy'
$env:DOPPLER_PROJECT = 'backend'
$env:DOPPLER_CONFIG = 'dev'
& 'C:\Program Files\dotnet\dotnet.exe' run --project examples\Doppler.SDK.Examples
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Text.Json (>= 10.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.1 | 83 | 5/29/2026 |