OnlyFans API DocumentationOnlyFans API
Account Connection

Authenticate Account

Connect an OnlyFans account using username and password.

Connect an OnlyFans account to the OnlyFans API Console using username and password.

The authentication process is asynchronous. The API returns an attempt_id and polling_url while the login is being processed. Use Authentication Status to poll the polling_url until authentication is complete.

Choose a proxy country that matches the country the account normally signs in from.

Or, try Authenticate with Session to connect the account using browser cookies instead, without password-based login or polling.

https://v1.onlyfansapi.io
POST
/api/authenticate
Request
curl --request POST \
  --url 'https://v1.onlyfansapi.io/api/authenticate' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "username": "user@example.com",
    "password": "password123",
    "name": "My OnlyFans Account",
    "countryCode": "US"
  }'

Headers

x-api-key*
string
Your API key. See Authentication.

Body Parameters

username*
string
The OnlyFans username or email address to sign in with.
password*
string
The password for the account. Minimum 6 characters.
name*
string
A label for the account, shown in your dashboard.
countryCode*
string
ISO 3166-1 alpha-2 country code that sets the proxy location, in capitals — for example US or GB.

Response Fields

FieldTypeDescription
attempt_idstringIdentifier for this connection attempt.
messagestringHuman-readable status of the queued attempt.
polling_urlstringAbsolute URL to poll for progress. Same as GET /api/authenticate/{attempt_id}.

Errors

StatusMessageCause
401API key is missingNo x-api-key header was sent.
401Invalid or inactive API keyThe key does not exist, or has been revoked.