Overview
A KSeF token is the credential your system uses to authenticate to Poland's KSeF API and open an online session. You generate it in the KSeF portal (or via the API), provide it to your integration — or to Notaly in Connect KSeF — and it lets you submit invoices without a qualified seal. The token authenticates the session; it is not used to sign the invoice.
What the token is for
KSeF (Krajowy System e-Faktur) is the national e-invoicing platform run by the Ministry of Finance (Ministerstwo Finansów). Before you can send a FA(3) invoice, your system must authenticate and open an online session. There are two ways to do that: sign the authentication challenge with XAdES using a qualified signature or seal (or a KSeF certificate), or authenticate with a KSeF-issued token.
In the token flow, the token is encrypted with the Ministry of Finance public key together with the challenge timestamp. That opens the session, and the invoice XML is then encrypted (AES-256, with the key wrapped by the Ministry's public key) and sent. The token is therefore an authentication credential, not a signing key — the invoice itself is not signed.
How to generate it
The token is issued through the KSeF portal or the KSeF API, following the Ministry of Finance's current instructions. Treat it like any other credential: store it outside your repository, rotate it if it is exposed, and keep track of its expiry so a request does not fail silently at the worst moment.
Where it fits in Notaly
In Notaly you paste the token once in Connect KSeF, in Settings. From then on Notaly authenticates each submission for you, sends the invoice to KSeF and returns the status and UPO through a webhook. You do not manage challenge timestamps, session renewal or expiry yourself.
If you are still evaluating, do not generate a production token yet — use the KSeF TEST environment first, where a test token lets you send test invoices without touching production data.
Disclaimer
Notaly is not a tax, accounting or legal advisor. This article is general information, not tax advice, and may be outdated. You are responsible for your own VAT compliance; confirm with a qualified accountant where required.
Sources
Source: www.podatki.gov.pl