eKsięgowy AI

How to get KSeF tokens

Generate an authentication token in the KSeF portal and connect it to eKsięgowy AI.

To send and receive invoices through KSeF, eKsięgowy AI needs an authentication token issued by the KSeF portal. This guide walks you through generating one and pasting it into the app. You will need a Qualified Electronic Signature (KEP) or a Trusted Profile (Profil Zaufany).

Use the test environment first
Generate a token in the KSeF test environment, verify it works in eKsięgowy AI, then repeat the process for production.
1

Open the KSeF portal

Open the KSeF portal in a new tab. Use the test environment first to verify your setup; switch to production once you are confident.

KSeF Taxpayer Application sign-in page
Sign-in page of the KSeF Taxpayer Application. Choose Login.gov.pl (mObywatel, banking, Profil Zaufany) or Certyfikat kwalifikowany.
2

Sign in and select your entity

After clicking your chosen sign-in method, complete the authentication flow (mObywatel, banking, or Profil Zaufany via Login.gov.pl, or your qualified certificate). When you return to KSeF, enter the NIP of the entity on whose behalf you'll act.

Entity identifier (NIP) selection screen
Enter the NIP of the company on whose behalf you'll issue and receive invoices.
3

Open the Tokens section

After signing in, go to Uprawnienia → Tokeny in the side menu.

KSeF dashboard with side menu showing Tokeny
KSeF dashboard. The side menu lists Faktury, Historia sesji, Uprawnienia, Tokeny, and Certyfikaty.
4

Fill out the token form

Open Tokeny → Generuj token in the side menu. Give the token a recognizable name (for example, 'eKsiegowyAI'). Below the name, tick the permissions eKsięgowy AI needs: 'wystawianie faktur' (issue invoices) and 'przeglądanie faktur' (view invoices). Do not grant administrative rights.

Token generation form with name input and permission checkboxes
Token form: name input on top, permission checkboxes below.
5

Generate and wait

Click 'Generuj token' at the bottom of the form. KSeF queues the request — the status screen shows 'W realizacji' (in progress). Click 'Odśwież' periodically to refresh status. Generation can take a few minutes.

Token generation in progress screen
'Generowanie tokena' status screen — click 'Odśwież' to update.
6

Copy the token

When generation finishes, the screen shows 'Zakończono pomyślnie' (completed successfully). The token appears in a copy field with a 'Kopiuj' button. KSeF warns 'Token wyświetlany jest tylko raz' — copy it immediately to a password manager.

Generated token displayed with Copy button
Token generation complete. Click 'Kopiuj', then store the token in a secure place.
The token is shown only once
If you lose it, you must generate a new one. Store it in a password manager or your team's secret vault.
7

Paste the token into eKsięgowy AI

Open KSeF settings in our app. Choose 'Direct KSeF API' as the integration mode and the matching environment (Production, Demo, or Test — the same one you used in KSeF). Paste the token into 'KSeF Authorization Token', enter your NIP, then click 'Save Settings'.

KSeF settings page in eKsięgowy AI
/ksef/settings page — fill in the token and NIP, then click Save Settings.

Useful links

How to Get KSeF Tokens