Home › Guide › KSeF 2.0 token
Guide

KSeF 2.0 token and its permissions

PewnyJPK.pl team·Last updated: 17 November 2026
A key with a blue tag on a closed laptop, a padlock and access cards beside it
Illustration generated by AI.
A KSeF token is a string of characters that a program, integration or tool uses to log in to KSeF (the Polish National e-Invoicing System) on behalf of a company. In KSeF 2.0 you generate it in the KSeF Taxpayer Application (Aplikacja Podatnika KSeF) and choose its permissions straight away, e.g. invoice viewing only. The token is displayed once, so copy it immediately. Tokens from KSeF 1.0 do not work in KSeF 2.0, and the Ministry of Finance decided that tokens will stay in the system indefinitely, not just until the end of 2026.

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:

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.

KSeF 1.0 tokens do not work Tokens generated in KSeF 1.0 are not compatible with KSeF 2.0. If a program still has an old token saved, the login will fail and a new one has to be generated. Do not look for tokens in the Certificates and Permissions Module (MCU) either: it only worked until the end of January 2026 and was switched off together with KSeF 1.0.

How to generate a token in the KSeF Taxpayer Application

  1. 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.
  2. Choose the context, i.e. the company (NIP) for which the token is to work.
  3. Go to token management and generate a new token.
  4. 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".
  5. Tick the token's permissions. Choose only those the program or person really needs (table below).
  6. 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:

PermissionWhat it givesWhen to grant it
InvoiceReadviewing invoicesdownloading cost and sales invoices, generating collective identifiers
InvoiceWriteissuing invoicesa program that sends invoices to KSeF
CollectiveIdentifierManagemanaging collective identifiersa person or system that only creates identifiers for transfers
CredentialsReadviewing permissionschecking who has access to the company's KSeF
CredentialsManagemanaging permissionsthe company's KSeF administrator; grant with care
Introspectionviewing session history and generating UPOa program that downloads UPO and checks sending sessions
SubunitManagemanaging subordinate unitsentities that have subordinate units
EnforcementOperationsperforming enforcement operationsenforcement 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

StatusWhat it means
Pendingthe token has been created, activation and granting of permissions are in progress; you cannot log in with it yet
Activethe token works and can be used to log in
Revokingrevocation in progress; the token no longer works
Revokedthe token has been permanently revoked
Failedactivation 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:

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 tokenKSeF certificate
Permissionshas its own, chosen when it is generatedonly authenticates; permissions come from those granted in KSeF
Validityuntil revoked; tokens remain indefinitelyat most 2 years from creation or from the indicated start date
Typesonefor 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

CauseWhat to do
A token from another environmentThe 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 tokenIt does not work in KSeF 2.0. Generate a new one in the KSeF 2.0 Taxpayer Application.
Status Pending or FailedWith Pending, wait for the status to change to Active. With Failed, generate a new token.
A NIP other than the token's contextThe token only works for the company in which it was generated. Check the NIP entered in the program.
Missing permissionLogin succeeds, but the operation is refused. Generate a token with the required permission; permissions are not added to an existing token.
Revoked tokenCheck 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 analytics

FAQ

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.

Free PDF + newsletter

JPK_KR_PD checklist by email

20 points the Ministry of Finance gateway does not check, with explanations and a calendar for the 2027 season. We send it once you confirm your sign-up, followed by new guide articles and changes to JPK_KR_PD. Unsubscribe with one click from any email.