> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onlyfanskit.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect an account

> Link a creator account on the hosted platform — embedded UI, email and password, or mobile approval. Sessions are stored for you.

Before you can act on an account, connect it once on the hosted API. onlyfanskit
stores the session securely; you only keep the account `id` and your API key.

<Note>
  Connect flows run on onlyfanskit infrastructure. You do not host login pages,
  parse browser cookies, or manage session files yourself.
</Note>

## Connect paths

<CardGroup cols={3}>
  <Card title="Embedded connect" icon="window-restore" href="/connect/embed">
    **Recommended for apps.** Hosted popup or iframe — the creator signs in
    without you handling credentials.
  </Card>

  <Card title="Email + password" icon="envelope" href="/connect/login">
    **Recommended for automation.** Start a login, poll until it resolves, handle
    SMS / authenticator / email challenges.
  </Card>

  <Card title="Mobile / QR" icon="mobile" href="/connect/mobile">
    Creator approves on their own device — no password in your stack.
  </Card>
</CardGroup>

## Which should I use?

| You are building…                                      | Use                                |
| ------------------------------------------------------ | ---------------------------------- |
| A dashboard, SaaS, or in-product onboarding            | [Embedded connect](/connect/embed) |
| A backend job, script, or agency tool with credentials | [Email + password](/connect/login) |
| A flow where the creator never shares a password       | [Mobile / QR](/connect/mobile)     |

Cookie paste and cURL import are **not** supported on the public platform.
Use one of the paths above so sessions stay on onlyfanskit infrastructure.

## One-shot vs poll

| Path              | Pattern                                                                                                                        |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Embedded / mobile | `POST /v1/connect/client-sessions` or `POST /v1/connect/login` with `auth_type: "mobile_app"` → poll until `completed_success` |
| Email + password  | `POST /v1/connect/login` → poll → optional `PUT` for challenge codes                                                           |

Success shape:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "account": { "id": "acct_...", "ofUserId": "123", "state": "active" },
  "probe": { "id": 123, "username": "creator" }
}
```

Challenges (SMS, TOTP, email device verification) are documented in
[Two-factor & challenges](/connect/two-factor).

<Info>
  Connecting requires the `accounts:write` scope and counts against your org's
  connect-attempt rate limit.
</Info>
