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.
Authorization
default Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys
In: header
Request Body
application/json
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).
"email_password" | "raw_data" | "mobile_app"A display name for the account. If omitted, defaults to the email address or auth_id.
The email address of the OnlyFans account. Required when auth_type is email_password.
The password of the OnlyFans account. Required when auth_type is email_password.
The auth_id from OnlyFans session cookies. Required when auth_type is raw_data.
The full cookie string (semicolon-separated). Required when auth_type is raw_data.
The X-BC token from request headers. Required when auth_type is raw_data.
The browser User-Agent string. Required when auth_type is raw_data.
The country of the managed proxy server you want to use. Eg. "us" for United States. Cannot be used together with customProxy.
"us" | "uk"Custom proxy configuration. Cannot be used together with proxyCountry.
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"
}