.png)
KSeF 2.0 shifts the focus from "issuing PDFs" to a controlled technical process: authentication, permissions, API sessions, acceptance statuses, and handling exceptional scenarios such as offline mode and outages. In practice, this means an integration does not end when "the system sends an invoice". It ends only when the invoice is accepted by KSeF, receives a KSeF number, and the process includes a defined path for periods when the system is unavailable.
Authorization tokens are one of the mechanisms that simplify launching an integration and automating work with KSeF. Tokens alone do not solve issues related to permissions, roles, or entity representation. If these elements are not properly configured, a token may work technically, while operations still fail due to authorization errors or lack of access to invoices.
This article walks through a practical model: what to prepare before working with tokens, how to generate them in MCU, how to test them at the API and permissions level, and how to connect this with the offline procedure so invoicing continues even when KSeF is unavailable.
In production environments, repeatability and automation are critical, especially when invoices are issued from an ERP, a sales system, or a billing platform. Tokens allow an integration to operate without manual authentication for each operation.
Most common token use cases:
In KSeF 2.0, the way permissions and integrations are managed changes, in particular through MCU. This distinction matters because organizations often try to carry over assumptions from KSeF 1.0 into KSeF 2.0, which leads to configuration and testing issues.
In this article, the process described applies to KSeF 2.0 and MCU, which is the operationally relevant model for 2026 implementations.
Before moving to tokens, align two layers:
The authentication method depends on the legal form and how the entity is represented:
Next, roles and permissions must be set. Operationally, this division typically applies:
Only then should you proceed to tokens, because a token does not "add" permissions. If a role does not have the right to download or issue invoices, the integration may authenticate, but operations will still fail.
In KSeF 2.0, tokens are generated in the Module of Certificates and Permissions (MCU). The Ministry of Finance made token generation available in MCU on December 8, 2025 and communicated it as part of the preparation for KSeF 2.0.
Access to MCU begins with authentication appropriate to the entity’s legal form and representation method. This is where operational mistakes most often occur: the login is correct, but actions are performed in the wrong context, for example different tax ID, different role, missing delegation, or an account without the required permissions.
In practice, before generating a token, confirm:
A token is not "granting permissions". A token is a method for authenticating an integration that uses permissions already granted. If roles are not clearly defined and assigned, the integration may authenticate successfully, while operations still fail due to authorization errors.
Before generating a token, confirm three areas:
This shortens later diagnostics, because most token issues come from authorization, not from the token itself.
In MCU, you generate a token for KSeF 2.0 and assign it to a use scenario, most often as a system integration token. After generation, treat the token as a production secret.
Good process practice before clicking "generate":
At the organizational standard level, use simple rules without depending on specific tools:
This matters for security, auditability, and maintenance. A token that exists in multiple places and circulates among people eventually becomes a source of incidents or process downtime.
Token verification should answer three questions:
The best approach is a three-layer test.
Goal: confirm the integration can authenticate with the token and begin working with the API.
What to check:
At this layer, you are not testing "can we issue an invoice". You are testing whether the integration can enter an operational mode.
Goal: confirm the token not only works, but provides real access to the operations you need.
The simplest testing method is to run an operation that requires a specific permission:
If the token works but permissions are incomplete, a typical symptom is that the session initiates successfully, but operations return an access denied error. This is not a token issue, but a roles and delegations configuration issue.
Goal: confirm the operation ends in what matters operationally.
For issuing invoices, the minimum end-to-end test should close:
Only after these conditions are met can the issuing process be considered stable and the integration considered end-to-end.
Below are the most common scenarios that create an integration that "seems to work".
Symptom: the integration authenticates, but invoice read or issue operations return access denied.
Most common causes:
Fastest remediation path:
Symptom: the invoice was sent, but the buyer cannot see it in their KSeF view.
The most common cause is incorrect counterparty data in the invoice structure, especially using the wrong identification field for the tax ID. In practice, this is a data validation issue, not a "KSeF error".
Process recommendation:
Symptom: the integration "sends" an invoice, but there is no acceptance confirmation or KSeF number.
Most common causes:
Recommendation:
A token is a secret. At the organizational standard level, define how tokens are stored, shared, and rotated.
Minimum security standard:
In practice, token security is part of operational continuity. Loss of control over a token or chaotic sharing usually results in invoicing downtime or urgent access remediation.
A token solves authentication in online mode. It does not solve what happens when KSeF is temporarily unavailable or when an organization has no access to the system.
Regardless of the authentication mechanism, an organization should have an emergency procedure that defines:
In practice, two cases appear:
These timelines must be consistent across procedures and tools because they affect risk control and process compliance.
Many organizations use a simple rule:
This is not about a "nice process". It reduces disputes and misunderstandings on the recipient side.
Offline modes often introduce QR codes on the invoice visualization. At this point, it helps to clearly separate two areas:
In practice, even correctly working tokens do not solve the full continuity problem. Offline is a separate implementation component.
In 2026, implementations will often be hybrid: tokens simplify starting an integration and automation, while the target security model relies on KSeF certificates, especially if the organization must support offline scenarios.
From an architecture perspective, separate:
If an organization operates strictly online and has stable infrastructure, tokens may be sufficient in the short term. If an organization has mobile or field sales, many locations, or a higher risk of connectivity loss, offline and certificates should be considered from the start.
No. Permissions follow from roles and delegations configuration. A token is an authentication mechanism.
Verification should cover three layers: technical (session), permissions (operations), process (UPO, KSeF number, acceptance status).
The process should switch to offline mode according to the organization’s procedure, and invoices should be submitted to KSeF within the deadline defined by the applicable mode. In parallel, apply delivery rules depending on recipient type.
Tokens are an online authentication tool. Offline requires a separate process approach and typically moves into certificates and issuer verification requirements.