Before You Start
Create OFAuth Account
Sign up at app.ofauth.com if you haven’t already.
Complete Platform Profile
Set up your platform profile (app name, description, website, privacy policy) via the setup wizard in Dashboard > Client Apps.
Create a Client App
Create a client app and choose your integration type (Redirect, Embed, or Whitelabel). Configure allowed redirect URIs or origins for your app. Copy your
clientAppId.Generate API Key
Go to API Keys and create your API key.
Set Data Access Permissions
Configure which OnlyFans data your integration needs access to (profile, posts, messages, etc.) in Dashboard > Client Apps > Settings > Access Permissions.
Configure Webhook Endpoint
Set up your webhook URL at Webhooks to receive connection events.
Development Setup
Use Sandbox Environment
Always develop and test using the Sandbox environment first.
Pre-Production Checklist
API key works with test requests
Link flow completes successfully in Sandbox
Webhooks are being received and processed
Connection IDs are stored and retrievable
Access API calls work with stored connection IDs
Error Handling
Ensure your integration handles these scenarios:| Scenario | Your Response |
|---|---|
SESSION_EXPIRED error | Prompt user to re-authenticate via Link |
RATE_LIMIT_EXCEEDED error | Implement exponential backoff |
connection.expired webhook | Notify user, initiate re-auth flow |
| Network/timeout errors | Retry with backoff |
Session Expiration Flow
Go Live Checklist
Switch to Production API Key
Replace your Sandbox API key with your production key.
Production and Sandbox use the same API endpoints. The environment is determined by your API key.
Set Up Monitoring
Monitor for:
- Webhook delivery failures
- Rate limit warnings
- Session expiration rates
- API error rates
Quick Reference
Required Headers
| Header | Value | Required |
|---|---|---|
apikey | Your OFAuth API key | Always |
x-connection-id | Connection ID (e.g., conn_abc123) | For Access API |
Content-Type | application/json | For POST/PUT/PATCH |
Key Endpoints
| Purpose | Endpoint |
|---|---|
| Verify API key | GET /v2/account/whoami |
| Start auth flow | POST /v2/link/init |
| List connections | GET /v2/connections |
| Get user profile | GET /v2/access/self |
| List subscribers | GET /v2/access/subscribers |
Webhook Events
| Event | When |
|---|---|
connection.created | User completes authentication |
connection.updated | Connection details change |
connection.expired | Session expires or is invalidated |
Need Help?
Quickstart Guide
Get your first API call working
Error Handling
Handle errors gracefully
Sandbox Environment
Test safely without affecting real accounts
Contact Support
Get help from our team