Rate limits

How the onefold per-application request budget works, which calls count toward it, and how to handle a 429 response.

Each application has a request budget per minute. Your plan sets the size of the budget; this page says how it works.

One budget per application

The budget belongs to the application, not to a user, an IP address or an endpoint. These all draw on the same budget:

CallsCounted
GET /api/v1/userinfo/Every request
The management API, /api/v1/manage/…Every request
Token exchanges and refreshes at /o/token/Successful ones only
Introspection at /o/introspect/Every request

An organization API key belongs to no single application: each of its calls counts toward the budget of the application named in its Onefold-Application header.

Not counted: authorization requests, revocation at /o/revoke_token/, discovery and the JWKS, and GET /api/v1/plans/.

A failed token exchange does not use the budget, so a stream of bad requests naming your client ID cannot exhaust it.

The size of the budget

The budget is api_rate_limit_per_minute on your plan. A value of null means unlimited. Read the value in force for your application from GET /api/v1/manage/entitlements/, or see Plans and limits.

When you exceed it

HTTP/1.1 429 Too Many Requests
Retry-After: 23

{ "code": "rate_limited", "detail": "…", "retry_after": 23 }

Wait retry_after seconds, then retry. The budget resets each minute.

A second kind of 429

The token endpoint also answers 429 when it receives too many requests with a wrong client secret:

{ "code": "token_exchange_locked_out", "detail": "…", "retry_after": … }

This is not the budget. Waiting and retrying with the same secret cannot succeed. Fix the secret. No plan changes this limit.

CodeMeansDo
rate_limitedOver the request budgetBack off and retry
token_exchange_locked_outWrong client secret, too many timesFix the secret

Staying within the budget

  • Do not call userinfo on every request. Read identity once at sign-in, from the ID token. If your API looks tokens up, cache the answer briefly, or use audience-bound tokens, which need no call.
  • Refresh when a token expires, not before every call.
  • Page with the largest page_size an endpoint allows.
  • Use webhooks instead of polling the management API for changes.

Other limits

  • Sign-in on the hosted pages is protected against repeated failed attempts. That protection applies to the people signing in, not to your application's budget.

On this page