We just released our native n8n integration!» Try now
OnlyFans API
Connect OnlyFans Account

Start Authentication

Start the authentication process for a new account. Supports three methods: email/password (default), cookies & headers (raw_data), or FansAPI Auth+ mobile app (mobile_app). For email/password, our systems will bypass Captcha and ask you for 2FA if required. For raw_data, provide session cookies directly for instant authentication. For mobile_app, the response includes a mobile_auth_session_deeplink that the creator opens on their phone (or scans as a QR code) to complete authentication via the FansAPI Auth+ mobile app. All credentials are stored securely and encrypted at rest.

POST
/api/authenticate
AuthorizationBearer <token>

Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys

In: header

Request Body

application/json

auth_type?string

The authentication method to use. Defaults to email_password if omitted. Use mobile_app to authenticate via the FansAPI Auth+ mobile app (no credential fields required).

Value in"email_password" | "raw_data" | "mobile_app"
name?string

A display name for the account. If omitted, defaults to the email address or auth_id.

email?string

The email address of the OnlyFans account. Required when auth_type is email_password.

password?string

The password of the OnlyFans account. Required when auth_type is email_password.

auth_id?string

The auth_id from OnlyFans session cookies. Required when auth_type is raw_data.

cookies?string

The full cookie string (semicolon-separated). Required when auth_type is raw_data.

xbc?string

The X-BC token from request headers. Required when auth_type is raw_data.

user_agent?string

The browser User-Agent string. Required when auth_type is raw_data.

proxyCountry?string

The country of the managed proxy server you want to use. Eg. "us" for United States. Cannot be used together with customProxy.

Value in"us" | "uk"
customProxy?

Custom proxy configuration. Cannot be used together with proxyCountry.

force_connect?boolean

Set to true to connect the account even if it already exists

Response Body

application/json

curl -X POST "https://app.onlyfansapi.com/api/authenticate" \  -H "Content-Type: application/json" \  -d '{}'
{
  "attempt_id": "auth_XXXXXXXXXXXXXXXXXXXXX",
  "message": "Authentication process started. Query the polling_url to check the progress.",
  "polling_url": "https://app.onlyfansapi.com/api/authenticate/auth_XXXXXXXXXXXXXXXXXXXXX"
}