Link a creator
Send a creator a hosted link for OnlyFans or Fansly, follow their sign-in, handle a failure, and relink an account that needs it.
Product page: OnlyFans agency API
Creators can link their own OnlyFans or Fansly accounts to your workspace on a page we host. They type their sign-in details there themselves and answer any two-factor code or check the platform asks for. BetterFans Link works only with creator accounts linked to your workspace. This guide creates a hosted link, follows it to the end, and covers what to do when it fails.
| OnlyFans | Fansly | |
|---|---|---|
| Signs in with | Account email and password | Username or email, and password |
| Two-factor code | From an authenticator app, a text message or email | By email or from an authenticator app |
| Human check | Sometimes | Never |
| Selfie check | Sometimes | Never |
Create the link
Call Create link with a note that names the creator. The note shows next to the link in the dashboard, so you can tell links apart later. Any key with the read scope can create links.
Set platform to onlyfans or fansly when you know where the creator is. Leave it out and the creator picks the platform when they open the link; until then the link's platform is null.
curl -X POST "https://betterfans.link/v1/links" \
-H "Authorization: Bearer $BFL_KEY" \
-H "Content-Type: application/json" \
-d '{ "note": "Jess Rivers", "platform": "onlyfans" }'The response holds a HostedLink with an id, a url and its platform. Keep the id to follow progress. Send the url to the creator.
Creating a link needs no approval and changes nothing on OnlyFans or Fansly. Nothing is linked until the creator finishes.
Over MCP, the link_account tool does the same, takes the same optional platform, and returns the url and linkId.
In the dashboard, owners, admins and developers can create a link with Link an account on the Accounts page, in live mode. Every link shows on the Linking page.
Send it to the creator
The link works for 24 hours and is for one creator. Something like this works well for OnlyFans.
Here is the link to connect your OnlyFans account: <url>
Open it on a device where you can sign in to OnlyFans. You type your OnlyFans email and password on that page yourself.
Keep your phone nearby. OnlyFans may ask for a two-factor code or a quick selfie check.
Keep the page open until it says you are connected. It takes a few minutes.And for Fansly.
Here is the link to connect your Fansly account: <url>
You type your Fansly username or email and your password on that page yourself.
Fansly may send a code to your email or ask for one from your authenticator app. Have them nearby.
Keep the page open until it says you are connected.Follow progress
Two ways to know how it went.
- Webhooks.
account.connectedfires when the account is linked, with the account indata.accountand the link id indata.linkId.link.failedfires when the sign-in ends without linking, with the reason indata.failure.code. - Polling. Get link returns the link's
status, and while the creator is signing in, astepin plain words. Over MCP, useget_link. Check every few seconds at most, and stop oncestatusis no longerwaitingorin_progress.
A link that nobody finishes in 24 hours ends as expired, and a link someone cancels in the dashboard ends as cancelled. Read those from Get link.
Link statuses
status | What it means | What to do |
|---|---|---|
waiting | Nobody has opened the link yet. | Make sure the creator got it. |
in_progress | The creator is signing in. step says where they are. | Nothing, unless step shows they are stuck. |
connected | The account is linked. accountId holds its id. | Read the account. It shows syncing for up to 30 minutes. |
failed | The sign-in did not work. | Find the reason, fix it, then create a new link. |
expired | Nobody finished within 24 hours. | Create a new link and send it again. |
cancelled | Someone cancelled the link in the dashboard. | Create a new link if it is still wanted. |
Steps the creator sees
step is one of these while the link is waiting or in_progress, and null once it ends.
step | What it means | What the creator does |
|---|---|---|
| Waiting for the creator | The link has not been opened yet. | Open the link. |
| Signing in | The platform is checking the sign-in details. | Wait. |
| Human check | OnlyFans asked for a human check. Fansly never asks for one. | Complete the check on the page. |
| Waiting for 2FA code | The platform asked for a two-factor code. | Enter the code from their authenticator app, text message or email. Fansly sends it by email or uses an authenticator app. |
| Waiting for selfie | OnlyFans asked for face verification. Fansly never asks for one. | Open the selfie link or scan the QR code on the page with their phone. |
| Verifying | The sign-in went through and is being checked. | Wait. |
| Syncing | The sign-in worked and the first sync is starting. | Wait until the page says they are connected. |
When it connects
accountId on the link, and data.account.id on the webhook, hold the new account's id. It is the creator's user id on its platform, and it is the accountId in every account route. data.account.platform says which platform the account is on.
Tell the user two things about a new account.
- It shows
syncingfor up to 30 minutes while its history fills in. Totals are low until then. See account status. - API writes start switched off. An owner or admin turns them on in the account's settings before any action can run. See writes and approvals.
When it fails
A failed link has a reason in data.failure.code on the link.failed webhook, and on the Linking page in the dashboard. Fix the cause, then create a new link.
failure.code | What happened | What to do |
|---|---|---|
bad_credentials | The platform did not accept the sign-in details: the email and password on OnlyFans, the username or email and password on Fansly. | Ask the creator to check their sign-in details on the platform, then try again on the same link while it is valid, or send a new link. |
code_expired | The two-factor code expired before the sign-in finished. | The creator enters their details again on the same link to get a new code, or you send a new link. |
account_in_use | The account is already connected somewhere else. A Fansly account can be connected in one place at a time. | Remove the account from the other workspace first, then send a new link. |
platform_unavailable | The platform could not finish the sign-in right now. | Wait a few minutes, then try again on the same link while it is valid, or send a new link. |
account_restricted | OnlyFans has limited the account. | The creator has to resolve the restriction with OnlyFans first. A new link will not help until then. |
otp_exhausted | OnlyFans stopped the two-factor step after too many attempts. | Wait a while before trying again, then send a new link. |
face_failed | The selfie check did not pass. | Send a new link. The creator should take the selfie in good light, with their face in the frame. |
timeout | The sign-in did not finish in time. | Send a new link. The creator should keep the page open until it says they are connected. |
cancelled | The sign-in was stopped before it finished. | Create a new link if the account should still be linked. |
unknown | Something else went wrong. | Send a new link. If it happens again, contact hello@betterfans.link with the link id. |
Handle a code not in this table as unknown.
A Fansly account can be connected in one place at a time. If it is already connected to another workspace, the link fails with account_in_use. Remove it there first, then send a new link.
Relink an account
An account in needs_relink, awaiting_2fa, awaiting_selfie or disconnected needs the creator to sign in again. Create a new link the same way and send it to the creator. A relink keeps the account's platform. When they finish, account.connected fires with data.relinked set to true, the account keeps its id and synced history, and its status goes back to healthy.
A restricted account cannot be fixed with a link. The creator has to resolve the restriction with OnlyFans first. Fansly accounts are never restricted.
Remove an account
Removing an account from your workspace stops your access and keeps the synced history. A Fansly account also stops syncing. BetterFans Link does not sign the creator out at Fansly, so their own sessions there keep working. If a Fansly removal cannot finish, the account stays in your workspace and you can try again. To link the account again later, send a new hosted link.
In test mode
A link made over the API with a test key is still a real link: the creator signs in to a real OnlyFans or Fansly account. The dashboard links accounts in live mode only. Its account.connected and link.failed events go to your test mode webhook endpoints. To build against sample data without linking anyone, use the sandbox creators that come with test mode.
Agent skills
Agent skills for the OnlyFans and Fansly API. Two skills teach an agent how BetterFans Link works and how to run agency jobs in Claude Code or Claude.ai.
Daily briefing
A morning summary for every creator, with account problems, yesterday's revenue, top fans, chats worth answering and mass message results.