Revisoradgang Data API Developers Version 1.7.0 Help First call

Get started

Authentication

Each request to a dataset needs a token. We issue the token. Your systems send it in a header:

Authorization: Bearer ra_test_k3v9x2m4q8zt_<secret>

The documentation and /openapi.json need no token.

Token format

A token has four parts with _ between them: ra_<env>_<prefix>_<secret>.

Part Content Secret
ra Always these two letters. A secret scanner can find our tokens by this start No
<env> prod for production. test for the test environment No
<prefix> 12 characters. It identifies the token. Give us the prefix when you ask about a token No
<secret> 43 characters, made from 32 random bytes Yes

We store only a SHA-256 hash of the secret. We cannot show a token again. If you lose a token, we issue a new one.

What the service checks

The service checks each request in this sequence. The first check that fails gives the error.

# Check Error
1 The request came through the public address of the service 403 origin_not_allowed
2 The token is correct, not revoked and not expired 401 invalid_token
3 The address of the request is in the IP list of the token 403 ip_not_allowed
4 Your firm is active 403 client_suspended
5 Your firm has the dataset 403 dataset_not_enabled
6 Your firm is below its limits 429 rate_limited

The answer 401 invalid_token is the same for each cause. It does not tell if the token is wrong, revoked or expired.

How to keep a token safe

A token gives access to the data of your agreement. Use it as you use a password.

WARNING: If a token was in a place that is not safe, tell us immediately. We revoke the token and issue a new one. A revoked token stops at once.

Rotation with 2 tokens

Your firm can have 2 active tokens at the same time. This lets you change a token and not stop your systems.

  1. Write to support@revisoradgang.dk for a second token. Do this a minimum of 2 weeks before the first token expires.
  2. We send the second token through a one-time link. The first token continues to work.
  3. Put the second token in your secret store and deploy your systems.
  4. Make sure that all your systems use the second token.
  5. Tell us. We revoke the first token.

Each token has its own IP list. Tell us if the second token needs a different list.

Expiry

Rule Detail
Each token has an expiry date We tell you the date when we send the token
Maximum life 400 days
Last valid moment The end of the expiry date, Danish time
After the expiry Each request gets 401 invalid_token
No automatic renewal Start the rotation before the expiry date

Put the expiry date in your calendar or your monitoring when you get a token.