Doppler.SDK 0.1.0-preview.1

This is a prerelease version of Doppler.SDK.
dotnet add package Doppler.SDK --version 0.1.0-preview.1
                    
NuGet\Install-Package Doppler.SDK -Version 0.1.0-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Doppler.SDK" Version="0.1.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Doppler.SDK" Version="0.1.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Doppler.SDK" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Doppler.SDK --version 0.1.0-preview.1
                    
#r "nuget: Doppler.SDK, 0.1.0-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Doppler.SDK@0.1.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Doppler.SDK&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Doppler.SDK&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Tool

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:

  1. Open the Doppler dashboard.
  2. Go to the project and select the config your app should read from.
  3. Open the Access tab.
  4. Click Generate.
  5. Name the token, optionally set expiration or write access, then click Generate Service Token.
  6. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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