Skip to main content
With an SDK, read the recovery action on the error: recoveryAction in TypeScript or recovery_action in Python. For direct API calls, read recovery.action in the error response. Use that action to choose your next step. Save requestId if you need support. The Errors reference explains the response fields and codes.

Choose the next step

Choose whether to try again

If you do not know whether a change succeeded, check its result before sending it again. For an error response, follow recovery.action to refresh, reconnect, request permission, fix the input, or try again. A network error does not prove that a post, story, or message failed. Follow recovery.action when the API returns an error. If you do not know the result, check for the new item before you send the request again.

Separate OAuth and API errors

The token and revoke endpoints return OAuth errors such as invalid_client and invalid_grant. Access, Vault+, and linked-account endpoints return error, recovery, and requestId fields for your app to read. A 401 does not always mean the OnlyFans account needs a new sign-in. The token may be invalid, the owner may have ended access, or the account may need to reconnect. Read the error to find the cause.

Avoid repeating a change

For reads, limit the number of attempts and wait longer after each failure. Add a small random delay so your app instances do not all retry at once. For requests that change data, check whether the first request succeeded before sending it again. Only use headers listed by the operation; do not assume the API detects repeated writes. Independent instances can refresh the same stable client-bound token concurrently. Retry a lost refresh response with bounded backoff. An invalid refresh grant requires authorization again. See refresh.

Log details for support

Log the operation, HTTP status, error, recovery.action, and requestId. Include the request ID when you contact support@ofauth.com. Keep authorization headers, tokens, client secrets, and OnlyFans session data out of logs.