KSeF 2.0 token and its permissions
What a KSeF token is for
You can authenticate to KSeF in several ways: with a qualified signature or electronic seal, a KSeF certificate or a token. A token is the simplest for programs and tools: it does not require signing every login, and its permissions are set in advance. Tokens are typically used by:
- accounting and sales systems that send invoices to KSeF or download them,
- accounting firms downloading their clients' cost invoices,
- online tools, e.g. our collective identifier generator (Polish interface).
A token works in the context of a company, i.e. for the specific NIP (or internal identifier) in which it was generated. You cannot log in on behalf of another company with one company's token.
Will tokens remain after 2026?
Yes. Under the original plans, tokens were to be an authentication method only until the end of 2026, and then to be replaced by KSeF certificates. The Ministry of Finance changed this: tokens will be kept indefinitely, and the regulation on using KSeF is to be amended. Tokens and KSeF certificates work in parallel.
How to generate a token in the KSeF Taxpayer Application
- Log in to the KSeF 2.0 Taxpayer Application with a trusted profile, a qualified electronic signature or a qualified electronic seal. You cannot log in to the application with a KSeF certificate.
- Choose the context, i.e. the company (NIP) for which the token is to work.
- Go to token management and generate a new token.
- Enter a description (5 to 256 characters). It will help you tell tokens apart later, e.g. "Accounting system – invoice download" or "Identifier generator – Anna Nowak".
- Tick the token's permissions. Choose only those the program or person really needs (table below).
- Copy the token immediately and store it somewhere safe, e.g. in a password manager. KSeF returns the token only once. If you lose it, you cannot read it again – you generate a new one.
A token does not work immediately after it is generated. First it has the status Pending (activation and granting of permissions), and you can only log in with it once the status changes to Active.
Companies with their own integration can also generate tokens via the KSeF 2.0 API. It is the same operation: a description, a list of permissions and a token returned once.
Token permissions
When generating a token you choose one or more permissions from the list. The names and descriptions come from the KSeF 2.0 API documentation:
| Permission | What it gives | When to grant it |
|---|---|---|
InvoiceRead | viewing invoices | downloading cost and sales invoices, generating collective identifiers |
InvoiceWrite | issuing invoices | a program that sends invoices to KSeF |
CollectiveIdentifierManage | managing collective identifiers | a person or system that only creates identifiers for transfers |
CredentialsRead | viewing permissions | checking who has access to the company's KSeF |
CredentialsManage | managing permissions | the company's KSeF administrator; grant with care |
Introspection | viewing session history and generating UPO | a program that downloads UPO and checks sending sessions |
SubunitManage | managing subordinate units | entities that have subordinate units |
EnforcementOperations | performing enforcement operations | enforcement authorities only |
The rule is simple: the fewer permissions, the safer. A token for downloading invoices does not need the right to issue them, and a token for a tool that creates collective identifiers does not need permission management. If several people or programs use tokens, give each their own token. Then revoking one will not stop the others.
Token statuses
| Status | What it means |
|---|---|
| Pending | the token has been created, activation and granting of permissions are in progress; you cannot log in with it yet |
| Active | the token works and can be used to log in |
| Revoking | revocation in progress; the token no longer works |
| Revoked | the token has been permanently revoked |
| Failed | activation failed; a new token has to be generated |
Token list and revoking
KSeF shows a list of tokens with their description, author, permissions, creation date and date of last use. Anyone with the
permission to view or manage permissions (CredentialsRead, CredentialsManage) sees all tokens generated
in the company's context. Others see only the tokens they authored.
Revoke a token when:
- the employee who used it leaves or changes duties,
- you end the cooperation with a software vendor or an accounting firm,
- the token may have leaked, e.g. it ended up in an email or a shared document.
A revoked token stops working immediately. It does not change anything done in KSeF before: invoices and collective identifiers
created with that token remain. Anyone with CredentialsManage can revoke any active token in the company's context.
Token vs KSeF certificate
A KSeF certificate is the second method for programs to log in to KSeF 2.0. Applying for and downloading a certificate is available in the KSeF 2.0 Taxpayer Application and via the API.
| KSeF token | KSeF certificate | |
|---|---|---|
| Permissions | has its own, chosen when it is generated | only authenticates; permissions come from those granted in KSeF |
| Validity | until revoked; tokens remain indefinitely | at most 2 years from creation or from the indicated start date |
| Types | one | for authentication, and a separate one for offline mode (a code on the invoice confirming the issuer's identity) |
For simple uses, e.g. downloading invoices or creating collective identifiers, a token is usually enough. An offline certificate is needed by companies that issue invoices in offline mode.
When logging in with a token does not work
| Cause | What to do |
|---|---|
| A token from another environment | The production, pre-production (demo) and test environments have separate tokens. Choose in the program the same environment in which the token was generated. |
| A KSeF 1.0 token | It does not work in KSeF 2.0. Generate a new one in the KSeF 2.0 Taxpayer Application. |
| Status Pending or Failed | With Pending, wait for the status to change to Active. With Failed, generate a new token. |
| A NIP other than the token's context | The token only works for the company in which it was generated. Check the NIP entered in the program. |
| Missing permission | Login succeeds, but the operation is refused. Generate a token with the required permission; permissions are not added to an existing token. |
| Revoked token | Check the list of tokens in KSeF. A revoked token cannot be restored. |
KSeF invoices as a data source
With a read-only token we can download your purchase and sales invoices from KSeF and prepare analyses: purchase price history, sales, costs, new-invoice alerts. Quote after contact.
See KSeF invoice analyticsFAQ
Where do I generate a KSeF 2.0 token?
In the KSeF 2.0 Taxpayer Application, after logging in with a trusted profile, a qualified electronic signature or a qualified electronic seal. Programs with an integration can also generate a token via the KSeF API. The Certificates and Permissions Module from KSeF 1.0 only worked until the end of January 2026.
Will KSeF tokens work after 2026?
Yes. Originally tokens were to be available until the end of 2026, but the Ministry of Finance decided that they will be kept indefinitely, and the regulation on using KSeF is to be amended.
Does a KSeF 1.0 token work in KSeF 2.0?
No. Tokens generated in KSeF 1.0 are not compatible with KSeF 2.0. A new token has to be generated in the KSeF 2.0 Taxpayer Application.
Which permission should a token for downloading invoices have?
For viewing and downloading invoices, InvoiceRead (invoice viewing) is enough. Issuing invoices requires InvoiceWrite. It is worth giving a token only the permissions the program or tool needs.
How does a token differ from a KSeF certificate?
A token has the permissions assigned to it when it was generated. A KSeF certificate is used only for authentication, and permissions come from those granted in the system. A certificate is valid for at most 2 years. Both methods work in parallel.
- Sources:
- "KSeF certificates", Ministry of Finance – ksef.podatki.gov.pl (Polish).
- "KSeF 2.0 questions and answers", Ministry of Finance – ksef.podatki.gov.pl (Polish).
- "KSeF implementation stages", Ministry of Finance – ksef.podatki.gov.pl (Polish).
- KSeF 2.0 API documentation (version 2.9.0), "KSeF tokens" and "Authentication" sections – api.ksef.mf.gov.pl.



