Request limit: 429
Over the limit, KSeF answers HTTP 429 “Too Many Requests” with a Retry-After header and blocks access to the API for the time given. The documentation's example: “Przekroczono limit 20 żądań na minutę. Spróbuj ponownie po 30 sekundach.” (limit of 20 requests per minute exceeded; try again after 30 seconds). Limits count per second, minute and hour. The higher limits between 20:00 and 06:00 apply only to downloading, and their values have not been published yet; sending invoices gets no higher limits at night.
What matters most when sending from Odoo:
- sending an invoice: 10 per second, 30 per minute, 180 per hour;
- opening an interactive session: 10, 30 and 120;
- invoice status in a session: 30, 120 and 1200;
- other requests: 10, 30 and 120.

Access denied: 403 and its reasonCode
| reasonCode | KSeF text |
|---|---|
| missing-permissions | “Brak wymaganych uprawnień do wykonania operacji w bieżącym kontekście.” (missing permissions in the current context) |
| ip-not-allowed | “Żądanie pochodzi z adresu IP innego niż wskazany podczas uwierzytelnienia.” (request from an IP other than the one given at sign-in) |
| insufficient-resource-access | “Brak dostępu do wskazanego zasobu.” (no access to that resource) |
| auth-method-not-allowed | “Ta operacja nie jest dostępna dla użytej metody uwierzytelnienia.” (not available for that sign-in method) |
| security-service-blocked | “Żądanie zostało zablokowane przez mechanizmy bezpieczeństwa.” (blocked by security mechanisms) |
| context-type-not-allowed | “Operacja nie jest dostępna dla uwierzytelnionego typu kontekstu.” (not available for that context type) |
401 and 403 answers come in the Problem Details format, and 400 and 429 can too if the program sends the header X-Error-Format: problem-details. Odoo does not send it.
What Odoo 18, 19 and 20 do
On a 401 Odoo refreshes the access token and repeats the request once. On a 403 it shows “KSeF API Error: ” with the response body, so you will see the reasonCode in the message. On a 429 it raises the error “Too Many Requests”:
- when sending, the invoice gets that error and stays without a KSeF status, and Retry-After is ignored: send it again a little later;
- downloading vendor bills, which Odoo does every 3 hours, reads Retry-After and reschedules itself.
After sending, Odoo asks for the status up to 5 times, 2 seconds apart. With many invoices sent at once, those requests count towards the status limit too.

How to avoid 429
An invoice that got “Too Many Requests” has no KSeF status, because KSeF did not take the request, so it goes back to the invoices you can send and there is no risk of it reaching KSeF twice. Send invoices in smaller groups and do not click resend repeatedly. If you regularly hit the sending limits of the interactive session, the Ministry of Finance advises considering batch mode first and, where the interactive session is a must, contacting KSeF support. Odoo only sends invoices in an interactive session. Our module, Poland KSeF 2.0 Validator, sends no requests to KSeF, so it does not use up these limits; with the subscription, its FA(3) validation goes to FlexigoTech Cloud.
Will a 403 security-service-blocked clear by itself?
The documentation only says the request was blocked by security mechanisms. If it keeps happening with correct data, report it to KSeF support.
Keep reading
Checked against the linked sources
Sources
- github.com/CIRFMF/ksef-api/blob/ce3670ea042de380039de4c5849fd6455811b292/limity/limity-api
- github.com/CIRFMF/ksef-api/blob/ce3670ea042de380039de4c5849fd6455811b292/open-api.json
- github.com/CIRFMF/ksef-api/blob/ce3670ea042de380039de4c5849fd6455811b292/limity/limity-api
- github.com/CIRFMF/ksef-api/blob/ce3670ea042de380039de4c5849fd6455811b292/limity/limity-api
- github.com/CIRFMF/ksef-api/blob/ce3670ea042de380039de4c5849fd6455811b292/limity/limity-api
- github.com/CIRFMF/ksef-api/blob/ce3670ea042de380039de4c5849fd6455811b292/limity/limity-api
- github.com/CIRFMF/ksef-api/blob/ce3670ea042de380039de4c5849fd6455811b292/api-changelog.md#
- github.com/odoo/odoo/blob/2fec20391a8a61ea3a3bf15e9f24d59dba910a8d/addons/l10n_pl_edi/tool
- github.com/odoo/odoo/blob/2fec20391a8a61ea3a3bf15e9f24d59dba910a8d/addons/l10n_pl_edi/tool
- github.com/odoo/odoo/blob/2fec20391a8a61ea3a3bf15e9f24d59dba910a8d/addons/l10n_pl_edi/mode
- github.com/odoo/odoo/blob/2fec20391a8a61ea3a3bf15e9f24d59dba910a8d/addons/l10n_pl_edi/data
- github.com/odoo/odoo/blob/2fec20391a8a61ea3a3bf15e9f24d59dba910a8d/addons/l10n_pl_edi/mode
- github.com/odoo/odoo/blob/2fec20391a8a61ea3a3bf15e9f24d59dba910a8d/addons/l10n_pl_edi/tool
- github.com/CIRFMF/ksef-api/blob/ce3670ea042de380039de4c5849fd6455811b292/limity/limity-api
- github.com/odoo/odoo/blob/2982b5f44af03fae6a9888f20632c1cc19f623ba/addons/l10n_pl_edi/tool
- github.com/odoo/odoo/blob/4d2d4b5895db70596863df941d9a1f0beeb117f8/addons/l10n_pl_edi/tool
- github.com/odoo/odoo/blob/2fec20391a8a61ea3a3bf15e9f24d59dba910a8d/addons/l10n_pl_edi/tool
