Altinn.ApiClients.Dialogporten 1.119.0-rc

This is a prerelease version of Altinn.ApiClients.Dialogporten.
This package has a SemVer 2.0.0 package version: 1.119.0-rc+5285de3.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Altinn.ApiClients.Dialogporten --version 1.119.0-rc
                    
NuGet\Install-Package Altinn.ApiClients.Dialogporten -Version 1.119.0-rc
                    
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="Altinn.ApiClients.Dialogporten" Version="1.119.0-rc" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Altinn.ApiClients.Dialogporten" Version="1.119.0-rc" />
                    
Directory.Packages.props
<PackageReference Include="Altinn.ApiClients.Dialogporten" />
                    
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 Altinn.ApiClients.Dialogporten --version 1.119.0-rc
                    
#r "nuget: Altinn.ApiClients.Dialogporten, 1.119.0-rc"
                    
#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 Altinn.ApiClients.Dialogporten@1.119.0-rc
                    
#: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=Altinn.ApiClients.Dialogporten&version=1.119.0-rc&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Altinn.ApiClients.Dialogporten&version=1.119.0-rc&prerelease
                    
Install as a Cake Tool

.NET SDK for Dialogporten ServiceOwner API

Simple overview Refit-based client SDK Based on https://github.com/altinn/altinn-apiclient-maskinporten

The refit-Interface is autogenerated with refitter. It uses OperationId to create method names. Uses refit IApiResponse on returns.

Installation

Install the nuget package through Package Manager Console:

Install-Package Altinn.ApiClients.Dialogporten

Or via .NET Core CLI:

dotnet add package Altinn.ApiClients.Dialogporten

Usage

This package needs some configuration to work. The configuration is done through the DialogportenSettings class. The settings are as follows:

  • BaseUri - The base URI of the Dialogporten API.
  • ThrowOnPublicKeyFetchInit - If true, the client will throw an exception if the public key fetch fails on startup. Default true.
  • Maskinporten - The Maskinporten settings.
    • ClientId - The client ID (secret).
    • EncodedJwk - The encoded JWK (secret).
    • Environment - The environment (test/prod).
    • Scope - Whitespace separated list of scopes to use against Dialogporten.

Registering with IServiceCollection

There are two ways to register

Register through action parameter:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDialogportenClient(x => 
{
    x.BaseUri = "https://platform.tt02.altinn.no/dialogporten";
    // x.ThrowOnPublicKeyFetchInit = false;
    x.Maskinporten.ClientId = "YOUR_CLIENT_ID";
    x.Maskinporten.EncodedJwk = "YOUR_ENCODED_JWK";
    x.Maskinporten.Environment = "test";
    x.Maskinporten.Scope = "digdir:dialogporten.serviceprovider digdir:dialogporten.serviceprovider.search";
}
Register through options instance parameter:
var builder = WebApplication.CreateBuilder(args);
var dialogportenSettings = builder.Configuration
    .GetSection("DialogportenSettings")
    .Get<DialogportenSettings>()!;
builder.Services.AddDialogportenClient(dialogportenSettings);

In this case, the configuration should look like this:

{
    "DialogportenSettings": {
        "BaseUri": "https://platform.tt02.altinn.no/dialogporten",
        // "ThrowOnPublicKeyFetchInit": false,
        "Maskinporten": {
            "ClientId": "YOUR_CLIENT_ID",
            "EncodedJwk": "YOUR_ENCODED_JWK",
            "Environment": "test",
            "Scope": "digdir:dialogporten.serviceprovider digdir:dialogporten.serviceprovider.search"
        }
    }
}

Available services

The following services are available after registration:

A background service (IHostedService) is also registered that periodically fetches the public key from the Dialogporten API. This is required to validate dialog token signatures.

See sample project for examples on how to use the services.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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 is compatible.  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. 
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
1.121.0-rc 15 9/4/2026
1.120.1-rc 19 9/1/2026
1.120.1-alpha.1788463247 19 9/3/2026
1.120.1-alpha.1788421084 18 9/3/2026
1.120.0 75 9/1/2026
1.120.0-rc 24 8/27/2026
1.120.0-alpha.1788168647 23 8/31/2026
1.119.1-rc 32 8/20/2026
1.119.1-alpha.1787826357 26 8/27/2026
1.119.0 118 8/20/2026
1.119.0-rc 36 8/17/2026
1.119.0-alpha.1787133628 32 8/19/2026
1.119.0-alpha.1786973049 33 8/17/2026
1.118.10-alpha.1786357013 31 8/10/2026
1.118.10-alpha.1786346925 36 8/10/2026
1.118.8 225 7/27/2026
1.118.8-rc 35 7/24/2026
1.118.7-alpha.1784896114 36 7/24/2026
1.118.6 136 7/17/2026
1.118.6-rc 35 7/15/2026
Loading failed