- Link authentication — Users authenticate through OFAuth’s secure Link flow. OFAuth handles credentials, 2FA, and session management.
- Import — You provide existing OnlyFans session data directly via the API. Useful if you manage authentication yourself or are migrating from another system.
Creating Connections via Link
Obtaining Connection IDs
After a user completes authentication through Link, you receive the connection ID through one of these methods:Using Client Reference ID
TheclientReferenceId you provide when initializing a Link session is your key to mapping connections to users in your system:
Importing Connections
If you manage OnlyFans authentication yourself, you can import sessions directly. Imported connections are not billed monthly and are not health-checked by the connection monitor. They can be used through the Access API immediately.Import a Connection
OFAuth validates the session by making a request to OnlyFans and automatically fetches the user’s profile data. If the session is invalid or expired, the import will fail.
imported: true and the user’s profile data fetched from OnlyFans.
Updating an Imported Session
If an imported connection’s session expires or needs to be rotated, you can update it in place without deleting and re-importing. This preserves the connection ID.
The new session is validated against OnlyFans and must belong to the same OnlyFans user as the existing connection. If the user ID from the new cookie doesn’t match, the request returns a
409 error.
active and the response includes updated user profile data from OnlyFans.
This endpoint only works for imported connections (
imported: true). Link-managed connections cannot be updated through this endpoint.Filtering by Type
List only imported or Link-created connections:Connection States
Connection Lifecycle
Connections may expire due to:- OnlyFans session expiration
- User password changes
- Extended inactivity
API Reference
List Connections
Response shape:
Delete Connection
Invalidate Connection
- Updating permissions: When your platform’s required permissions change, invalidate the connection so users reconnect with the new permission set
- Security rotation: Force users to re-authenticate without losing their connection history
- Graceful session refresh: Refresh credentials while maintaining connection metadata
When you invalidate a connection, the user’s profile data and permissions configuration are preserved. Only the session data is cleared.
Updating User Data Permissions
When your platform needs to request different permissions from connected accounts, use the invalidate + reconnect flow:Step 1: Update Your Platform Permissions
In your OFAuth Dashboard, update the User Data Permissions to include the new permissions your platform requires.Step 2: Invalidate Existing Connections
Step 3: Prompt User to Reconnect
When users reconnect through Link with the sameconnectionId, they’ll be prompted to approve the updated permissions:
Invalidate vs Delete
Invalidated connections send
connection.expired and can be reconnected with the same connection ID. Deleted connections send connection.disconnected and cannot be reconnected or renewed.
Reconnecting Expired Connections
When a connection expires, you can reconnect the same OnlyFans account without creating a duplicate connection. Pass the existingconnectionId when initializing a new Link session:
When a valid
connectionId is provided:
- The user completes authentication through Link
- The existing connection is updated with fresh session data
- Connection ID remains the same, preserving your references
connectionId is provided:
- The system automatically creates a new connection instead
- No error is thrown—this allows graceful handling of deleted connections
Best Practices
- Monitor status via webhooks
- Handle expiration with re-auth flows using
connectionId - Store securely - treat connection IDs as credentials
- Clean up unused connections to stop billing
Next Steps
Access API
Use connections to access data
System Webhook Events
Monitor connection events