Going live
Go through this list before switching your integration to the live environment.
Security
- Call the API from your backend only. Your
secretKeymust never reach a browser or an app. The frontend talks to your backend, and your backend talks to IDkollen. - Decide on the result in your backend. Fetch the result from IDkollen on your server, or take it from a verified callback. Never trust a status or an identity that your frontend reports.
- Check that it is the right person. If you expect a specific user, send their
ssnwhen starting (where the eID supports it), and compare thessnin the result with the one you expected. - Tie the flow to the user's session. Store the
idin the user's session when starting, and only accept the result of thatidfor that session. Otherwise one user could complete a flow started by another. - Verify callback signatures, using the raw body. See Callbacks.
- Keep
qrStartSecretin your backend. Generate BankID QR codes there. See Showing BankID to the user. - Store keys as secrets, for example in your platform's secret manager, not in source code.
- Ask for an IP allowlist. IDkollen can restrict your keys to your servers' IP addresses. Contact support@idkollen.se.
Robustness
- Handle every status:
COMPLETED,FAILEDwith eacherrorcode, and codes you don't know yet. - Let the user cancel. Call the flow's
DELETEendpoint when the user leaves or cancels, so they can start over. - Poll as a fallback if you use callbacks, since callbacks are not retried. See Callbacks.
- Store the result right away. Results are only kept for about 15 minutes. See Concepts.
- Respect the rate limits and retry
429responses after the time given in the response. See Errors. - Show helpful messages while the user is in their eID app, for BankID with the
hintCode. See Messages to the user. - Monitor status.idkollen.se for incidents and planned maintenance.
Logo
If you use the standard API that requires you to show the IDkollen logo on your page, use one of the snippets below. The premium API does not require it.
The logo must be 180px wide, and is available for light and dark backgrounds.

Light background:
<a href="https://idkollen.se/rest_api/" target="_blank"><img src="https://idkollen.se/wp-content/uploads/2024/04/poweredby_pos_horizontal.svg" style="width: 180px; height: auto; margin: 15px;"></a>
Dark background:
<a href="https://idkollen.se/rest_api/" target="_blank"><img src="https://idkollen.se/wp-content/uploads/2024/04/poweredby_neg_horizontal.svg" style="width: 180px; height: auto; margin: 15px;"></a>
Switching over
- Ask support@idkollen.se for live keys, and to whitelist your live callback and redirect URLs.
- If you use callbacks, allow the live callback IPs listed in the Overview, and use the live HMAC key.
- Change the base URL to
https://api.idkollen.se, or the SDK environment to production. - If you use the standard API, add the logo to your page.
- Do one real authentication with your own eID, and check the result end to end.