Skip to content
Auth

The Auth Module built for Fanvue

Fanvue API authentication is a drop-in connection flow for creator accounts with 2FA support, encrypted session vaulting and automatic session refresh.

auth.tsts
import { FanvueAuth } from "@apifanvue/sdk";

const auth = new FanvueAuth({ apiKey: "sk_live_..." });

const { accountId } = await auth.connect({
  onTwoFactorRequired: async () => promptUserForCode(),
});

const api = auth.client();
await api.chats.send({ accountId, fanId: "fan_128", text: "Hi" });

A connection flow that just works

No Fanvue login is ever shown or stored by your site. Everything is handled by the hosted modal.

Full connection flow

Login, 2FA and session handling handled end to end.

Session vaulting

AES-256 encryption, per-tenant isolation and auto-refresh.

Drop-in modal

Two lines of JavaScript, themeable to match your app.

Multi-account

Connect unlimited creators with no cross-contamination.

Scoped access

Per creator, per teammate access control on every key.

Recovery flows

Built-in handling for expired sessions and re-authentication.

Security

Sessions are encrypted, scoped and refreshed automatically

Every connected Fanvue account gets its own encrypted session vault. Keys can be scoped per project, per teammate or per creator.

  • AES-256 encryption at rest for every session
  • Automatic refresh before a session expires
  • Per-creator, per-teammate scoped API keys
  • Full audit log of every authenticated call
auth.tsts
import { FanvueAuth } from "@apifanvue/sdk";

const auth = new FanvueAuth({ apiKey: "sk_live_..." });

const { accountId } = await auth.connect({
  onTwoFactorRequired: async () => promptUserForCode(),
});

const api = auth.client();
await api.chats.send({ accountId, fanId: "fan_128", text: "Hi" });

Pairs with the rest of the platform

Once an account is connected, every other Fanvue API module can use it immediately.

Combine the Auth module with ads tracking for revenue attribution, with data download for exports, or see pricing for plan limits.

Frequently asked questions

Ready to build on Fanvue?

Get API keys, docs and MCP access in one click. Free trial, no credit card.