---
title: "Start Authentication"
method: POST
path: "/api/authenticate"
tags: ["Connect OnlyFans Account"]
---

# Start Authentication

`POST /api/authenticate`

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.

## Request body

- object
  - `auth_type` 'email_password' | 'raw_data' | 'mobile_app' — 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).
  - `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` 'us' | 'uk' — The country of the managed proxy server you want to use. Eg. "us" for United States. Cannot be used together with customProxy.
  - `customProxy` object — Custom proxy configuration. Cannot be used together with proxyCountry.
    - `host` string — The hostname or IP address of your custom proxy server
    - `port` integer — The port number of your custom proxy server (1-65535)
    - `username` string — The username for proxy authentication (optional)
    - `password` string — The password for proxy authentication (optional)
  - `force_connect` boolean — Set to true to connect the account even if it already exists

## Response `200`

- union
  - object — For email_password or raw_data auth types
    - `attempt_id` string
    - `message` string
    - `polling_url` string
  - object — For mobile_app auth type — includes the session code to scan with the FansAPI Auth+ app
    - `attempt_id` string
    - `message` string
    - `polling_url` string
    - `mobile_auth_session_deeplink` string

---

[API](https://skmtc.net/onlyfansapi/apis/onlyfans-api.md) · [All operations](https://skmtc.net/onlyfansapi/apis/onlyfans-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onlyfansapi/onlyfans-api/revisions/4a99d36f28a3/schema)
