thepaliaDevelopers

Rate limits & retries

Cache access tokens, respect token issuance limits, and avoid duplicate enrollments.

Token issuance limit

POST /v1/oauth/token accepts 20 requests per minute per client IP. Applications sharing an outbound IP share this limit. Requests above the limit return HTTP 429.

This is the documented limit for token issuance, not a general quota for every v1 operation. See the token reference for its response details.

Reuse tokens for 24 hours

Cache the access token and its expiry on your server. Reuse it for all protected requests until it expires instead of requesting a new token for every customer or API call. See Authentication.

Handle a rate-limited token request

  1. Check whether your server already has a valid cached token.
  2. If you need a new token, pause before retrying. Do not loop immediately on 429.
  3. Use a bounded retry policy with increasing delays and jitter, allowing the minute window to clear. Stop after a reasonable number of attempts and surface the failure.
  4. Coordinate concurrent workers so only one refreshes the shared token at a time.

The token endpoint does not guarantee a Retry-After header. Your integration must be able to wait and back off without one.

Retry safely

SituationSuggested action
Invalid credentials or input (400, 401, 415, 422)Fix the request or credentials before trying again.
Token issuance returns 429Reuse a valid token or wait and retry with backoff.
A read request times outRetry with a bounded backoff policy.
Enrollment creation times out after sendingReconcile the uncertain result before creating another enrollment.

Enrollment creation is not idempotent

POST /v1/course-enrollments has no idempotency protection. A timeout may mean the enrollment was created but its response was lost. Blindly resending the request can create another billed enrollment.

Store returned IDs whenever available. If a creation result is uncertain and you cannot reconcile it from your own records, contact our dev team before submitting another creation request. The API does not expose a public enrollment lookup by your order ID.

A retry should recover from a failure without turning one purchase into two enrollments.

Verify your integration

Use staging and confirm that multiple protected requests reuse the same token. You do not need to deliberately exceed the limit to test your integration: simulate a 429 in your own application tests and verify that retries stop after your configured bound.

Check system status when investigating a wider outage, and follow the enrollment guide for the complete flow.

On this page