Account linking
Link OnlyFans accounts from inside your own app
Put the account sign-in inside your own product. One script opens it in a popup or a dialog over your page. The creator signs in and answers any code or selfie check in the browser, and your page follows each step until the account is linked.
import { connect } from "https://betterfans.link/connect/v1.js";
// Your server makes the link with your key and returns it.
const result = await connect({
link: () => fetch("/api/creator-link", { method: "POST" }).then((r) => r.json()),
display: "popup",
onEvent: (event) => console.log(event.type, event.step ?? ""),
});
if (result.status === "connected") {
console.log("Linked", result.account.username);
}Account linking
What the connect script handles
One file, any framework
Plain JavaScript with types and no dependencies. It works the same from React, Vue, Svelte or a page with no build step.
Popup or dialog
Open the sign-in in a small window over yours, or in a dialog over your page for phones and apps that keep to one window.
Codes on the same screen
When OnlyFans asks for a code by app, text or email, the creator types it right there and carries on.
Selfie check in the browser
When OnlyFans asks for a selfie, the creator takes it in their phone's browser. There is no app to install.
Every step as it happens
Your page hears each screen the creator reaches, from signing in to linked, so your interface can follow along.
Confirmed on your server
The account.connected webhook tells your server which account joined, so you act on what your server saw.
FAQ
Frequently asked questions
Does the creator need to install an app to link their account?
No. Signing in and typing a two-factor code happen in the browser the creator is already using. When OnlyFans asks for a selfie, they take it in their phone's browser.
Which frameworks does the connect script work with?
Any. It is one plain JavaScript file with no dependencies and types next to it, so it works from React, Vue, Svelte or a plain HTML page, where a <betterfans-connect> button does the whole job.
Where does my API key go when a creator links from my app?
On your server only. Your server creates the link with your key and hands the link to your page, so the key never reaches the browser.
Can creators link Fansly accounts the same way?
Yes. The creator picks OnlyFans or Fansly on the first screen, and your page gets the same events and result for both.
Related
Related features
For agencies
Many creators, one workspace. Roles for your team, keys per account and a log of every call.
Webhooks
Get messages, sales, subscribers and approval results pushed to your server, signed and retried.
Fan data API
Search and rank fans by spend. Subscriptions, lists, notes and who is online now.
GET STARTED
Build it in test mode today.
Sign up, make a test key and work against sandbox creators. Link a real account when your flow is ready.
Questions first? Write to hello@betterfans.link.