Sist endret: 9. jul. 2025

Altinn Varslinger API

En oversikt over Altinn Varslinger API

Altinn Varslinger API er et HTTP-basert RESTful API som tilbyr endepunkter og handlinger for å bestille, håndtere og gjennomgå varslinger sendt gjennom Altinn.

Base URL

The following base urls correspond to each environment

  • AT (Private Altinn acceptance test environment)

    https://platform.{environment}.altinn.cloud/notifications/api/v1
    
  • TT02 (Application owner test environment)

    https://platform.tt02.altinn.no/notifications/api/v1
    
  • Production

     https://platform.altinn.no/notifications/api/v1
    

Autentisering og Autorisasjon

Altinn-token

The Notifications API is secured using OAuth2 and all requests must include a valid Altinn token either in the Authorization header or in the AltinnStudioRuntime cookie.

For clients within the Altinn eco-system representing an external user or organization, the Altinn token in an incoming request can be forwarded to the Notifications API.

If you are using the API from an external system you will need to generate a Maskinporten or ID-Porten token and exchange this for an Altinn token before calling the Notifications API.

Below are two guides on how to achieve this.

Maskinporten-scopes

Some endpoints in the API may require additional authorization in the form of a Maskinporten scope. A scope represents a permission that a consumer has access to.

You can connect a given set of scopes to the specific Maskinporten integration instance that provides your API client with Maskinporten tokens upon request.

Please reference Maskinporten’s own documentation on registering a new integration through their self service API.

Maskinporten clients are created in the self-service portal:

  1. Start by logging into your account with your chosen method.
  2. When logged into your account, the organisation you represent is shown in the top menu to the right.
    The organisation you represent is shown in the top menu
    The organisation you represent is shown in the top menu.
    If you logged in to represent a synthetic organisation, you will also be able to change the synthetic organisation you represent in the drop down menu on that item.
    You can change synthetic organisation in the drop down menu
    You can change the synthetic organisation you represent in the drop down menu.
  3. Select the Create client button to start creating a new client for the organisation you represent.
  4. On the Add client page select Maskinporten.
  5. On the Add Maskinporten client page fill in the display name, description and add your required scopes (these values can also be changed later). Then click the Create button.
    The add Maskinporten client page
    The 'Add Maskinporten client' page.
  6. You have now created a Maskinporten client for your organisation. To use this client you need to add at least one authentication key. The client supports JWK and PEM keys. Start by either locating an existing key or creating a new one. You can use the Altinn JWKS tool or other key generator of your choice for this. Next, navigate to the key section on your client page and select Add.
    Select the key section on your client page
    Keys can be added in the key section.
    In the JWK or PEM format field paste your public key and click Save. The key is now added to the client. Store your private key from your JWK or PEM in a secure location, as it is used to authorize the use of this client. If you use Azure Key Vault to store your private keys, they need to be base64-encoded before uploading.
    Paste your public key here
    The JWK or PEM public key is pasted in this field
  7. If you didn’t do so in step 5, you need to add the desired scopes to your client before it can be used.
    Adding scopes to the client
    From the Scopes tab on your client definition, click the Add button.
    Adding scopes to the client
    Scopes available to your organisation will be shown in the list. Select the required ones and click Submit.

Plattform Aksess-token

The access to a subset of endpoints in the API is limited to callers within the Altinn ecosystem. These APIs require additional authorization in the form of a Platform Access Token.

Please reference developer documentation for the client system on how to generate the token.