Every non-2xx response throwsDocumentation Index
Fetch the complete documentation index at: https://docs.onlyfanskit.dev/llms.txt
Use this file to discover all available pages before exploring further.
OnlyFansAPIError:
What the common errors mean
| Status | When you’ll see it | What to do |
|---|---|---|
| 400 | add a payment card (code 106) | Subscribing requires a card on file, even for free creators. |
| 400 | User cannot comment / can't add this post to bookmarks | The account isn’t age-verified. Many fan-side actions require it. |
| 401 | Session expired or revoked | Reconnect the account with a fresh session. |
| 403 | Not subscribed, or a creator-only endpoint | Subscribe first, or call from the creator’s account. |
| 404 | Resource not found | Check the id or username. |
| 429 | Rate limited | Back off and retry. See Rate limiting. |
Exposing errors over HTTP
When you surface SDK results through your own HTTP API, convert thrown errors into RFC 9457 problem documents so your callers — including AI agents — get a parseable, actionable contract instead of a raw stack trace:errorResponse classifies the failure (age verification, billing, access,
rate limit, and more) and produces the right problem type automatically.