Connect OnlyFans Account

Update Authentication Credentials

Changed on

Replace the authentication credentials of an existing connected account and trigger a re-authentication. Supports the same three methods as Start Authentication: email/password (default), cookies & headers (raw_data), or FansAPI Auth+ mobile app (mobile_app). You can also switch an account from one method to another (e.g. from email_password to raw_data). The new credentials are stored securely and encrypted at rest, and re-authentication is started immediately regardless of the account's current session state — running workflows are stopped and API requests return 503 until re-authentication completes. For mobile_app, the response includes a mobile_auth_session_deeplink that the creator opens on their phone to complete authentication.

put/api/authenticate/{account_id}/credentials

Request

  • Base URL
    https://app.onlyfansapi.com
  • URL
    https://app.onlyfansapi.com/api/authenticate/{account_id}/credentials
  • Auth
    HTTP bearer

Request body

auth_type'email_password' | 'raw_data' | 'mobile_app'

The authentication method to use. Defaults to email_password if omitted.

emailstring

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

passwordstring

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

auth_idstring

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

cookiesstring

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

xbcstring

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

user_agentstring

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

Example request

{
  "auth_type": "email_password",
  "email": "lilian00@example.org",
  "password": "q.\";a.;L.Qv]XF",
  "auth_id": "praesentium",
  "cookies": "et",
  "xbc": "sunt",
  "user_agent": "eum"
}

Response

OR

Example response

{
  "attempt_id": "auth_XXXXXXXXXXXXXXXXXXXXX",
  "message": "Authentication credentials updated. Re-authentication started. Query the polling_url to check the progress.",
  "polling_url": "https://app.onlyfansapi.com/api/authenticate/auth_XXXXXXXXXXXXXXXXXXXXX"
}

Changes