Authentication


To authenticate with SendRegning we require the Authorization and the Originator-Id headers with every request.

JavaScript example (polyfill)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
fetch('https://www.sendregning.no/originators/current', {
    method: 'GET',
    headers: {
        'Authorization': 'Basic ZGVtb0Bsb2NhbDoxMjM0NTY=', // demo@local:123456
        'Originator-Id': '100000000',
        'Accept': 'application/json',
        'Content-Type': 'application/json'
    }
    })
    .then((resp) => resp.json())
    .then((data) => {
        console.log(data);
    })
    .done();