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.
Authorization
default Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys
In: header
Path Parameters
The Account ID whose credentials should be updated
Request Body
application/json
The authentication method to use. Defaults to email_password if omitted.
"email_password" | "raw_data" | "mobile_app"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.
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"
}