Send e-post til DSOP@bits.no dersom FAQ ikke besvarer ditt spørsmål.

Maskinporten

Eksempel token request

Eksempel uten signatur: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsIng1YyI6WyJNSUlFNURDQ0E4eWdBd0lCQWdJTEFmTEU3RzEyRGJhTEpOZ3dEUVlKS29aSWh2Y05BUUVMQlFBd1VURUxNQWtHQTFVRUJoTUNUazh4SFRBYkJnTlZCQW9NRkVKMWVYQmhjM01nUVZNdE9UZ3pNVFl6TXpJM01TTXdJUVlEVlFRRERCcENkWGx3WVhOeklFTnNZWE56SURNZ1ZHVnpkRFFnUTBFZ016QWVGdzB4T0RFeU1EY3hNak01TURaYUZ3MHlNVEV5TURjeU1qVTVNREJhTUVveEN6QUpCZ05WQkFZVEFrNVBNUkF3RGdZRFZRUUtEQWRDU1ZSVElFRlRNUlV3RXdZRFZRUUREQXhDU1ZSVElFRlRJRlJGVTFReEVqQVFCZ05WQkFVVENUa3hOamsyTURFNU1EQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURDQ0FRb0NnZ0VCQU1JUmJGZkUxUnVuVDFsV0VaamYwejJhQitoSm1RUVNyVFNOWVd5WkE0M1RuRmJhbjVlZTFQV1hnV2VaNERzNExaYWVzV05GKzFvdTE1M3hKSmRPQ2M2VDNrRXlrYUNScXQ3UVl4bHczQVova01NV2dtaUllK0lUNmRuSkVBZDB5c1NJaldYQzd0Vktoa0hQRUxPY2RpVkxrVVNDa3ExZVVXQlFaaGNncEJHWlBoSDNVRHE4V2E1SEl5YnJacnFVNGpVMDMrQURpdkxHRTNSeStnV21HNEZodGxtN0xHcEptMmQ1L0UvQXBQcm44alJ6TVNIM3RJbm5hbFVGOHZLZ3dJVEpqTHB5V0F4SFBBQUZTMEE2blMrMnA1dzRNVjY4b0xwdFJOb3Z4UkoxSURoVVdrTW5lQUJFbWg4bkZUTkxNREtWc1Jrc0wxekpjemNiM3VnZXVoTUNBd0VBQWFPQ0FjSXdnZ0crTUF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FmCqKt6OMXxsNJpKhVKgY3Eerb95p4mG0Yo5/So/WQjsaQxMVy5N/KHjN2Nd62KSWpx1kuVl6IPIPznzVkulb79/A+RmTs="
   ]
}
Kommentarer til header:
-	KID skal ikke benyttes hvis det ikke er avklart med Difi (Bruk x5c)
-	x5c skal ikke inkludere sertifikatetkjeden

Eksempel på payload:
{
  "iat": 1572352770,
  "scope": "bits:kundeforhold.write",
  "nbf": 1572352777,
  "exp": 1572352877,
  "iss": "d61fe9d0-802c-499b-8eb8-c7b4c3085d01",
  "aud": "https://oidc-ver2.difi.no/idporten-oidc-provider/"
}

Kommentarer til header:
-	iat, nbf og exp defineres per forespørsel
-	iss skal være klient ID definert i selvbetjeningsportalen
-	aud og scope skal ikke endres

Asymmetriske nøkler

Difi har gitt tilbakemelding om at det er en feil med selvbetjenings API’et som brukes til å forhåndsregistrere asymmetriske nøkler (JWKS). X5c i JWT header kan benyttes i stedet.

API-spesifikasjon

Boundary i batch

Det er viktig at boundary er korrekt definert i body og header. I header skal verdi i boundary ikke ha anføreselstegn (“). Hvis KFR returnerer 403 på batch-forespørselen er dette sannsynligvis fordi boundary har blitt definert feil enten i header eller body.

Se eksempel under.

Eksempel BATCH

POST https://preprod.api.bits.no/kar-ws/api/v1/customers/financialInstitutions/916960190/batch

=== HEADER ===
Authorization: Bearer <token>
Content-Type: multipart/form-data; boundary=873380600719114776488944
CorrelationID: 2b6fc544-e708-4887-8425-378733eea631
User-Agent: PostmanRuntime/7.18.0

=== BODY ===
--873380600719114776488944
Content-Disposition: form-data; name="customer_type";

DSOPBANK

--873380600719114776488944
Content-Disposition: form-data; name="customers"; filename="customers.csv";
Content-Type: text/plain

922203687#2019-11-08,958069367#2011-11-05,921785194#2019-10-15,917439389,989181335#2019-01-03,996128768 
--873380600719114776488944--