Fehlercodes · ksef · Polen

KSEF-21170Teilweise

KSeF interactive session has expired

So lautet die Ablehnung wörtlich: „[KSEF-21170] KSeF error 21170 ("Sesja interaktywna wygasła") is returned when the caller uses a session token whose validity window has elapsed. Interactive sessions have a bounded lifetime set by the Ministry of Finance (currently 2 hours from InitSession, refreshed by activity), and once expired the session cannot be resumed — a fresh authentication challenge is required.“

KSeF sessions come in two shapes: interactive (/online/Session/InitSigned or InitToken) and batch (/batch/Session/*). Interactive sessions carry a session token in the SessionToken header and are subject to both an absolute lifetime and an idle timeout. When either boundary is crossed, subsequent calls with that token return HTTP 401 and exceptionCode 21170. The session cannot be extended after expiry — the client must run AuthorisationChallenge → InitSigned/InitToken again.

Was Sie bereithaltenDie korrekten Werte aus Ihrer Buchhaltung; wir zeigen Ihnen, welche Stelle betroffen ist.
Was wir tunDetect 21170, discard the expired session token, run a fresh authentication challenge, and replay the failed request under the new session. Add proactive session refresh before the documented lifetime elapses.
So sieht der Befund ausBeispiel
BefundPrüfung nötig · KSEF-21170
Von IhnenDie korrekten Werte
DanachErneute Prüfung
NachweisSHA-256 und /verify-Link nach der Prüfung