OnlyFans API
OnlyFansConnect OnlyFans Account

Update Authentication Credentials

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
AuthorizationBearer <token>

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

In: header

Path Parameters

account_id*string

The Account ID whose credentials should be updated

Request Body

application/json

auth_type?string

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

Value in"email_password" | "raw_data" | "mobile_app"
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.

Response Body

application/json

curl -X PUT "https://app.onlyfansapi.com/api/authenticate/acct_XXXXXXXXXX/credentials" \  -H "Content-Type: application/json" \  -d '{}'
{
  "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"
}