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

# First Call

> Go from zero to one successful authenticated request to the Fanvue API in about five minutes.

This is the shortest path to proving your access works: one authenticated request that returns your own account details. No app to build, no framework, just credentials, a token, and a single call to `GET /users/me`.

By the end you'll have called the live API at `https://api.fanvue.com` and seen your real profile come back as JSON.

<Info>
  Every request needs two things in its headers: a **Bearer token** (an access token you send to prove who you are) and the `X-Fanvue-API-Version` header (which pins the API version so your call behaves consistently). Both are covered below.
</Info>

<Steps>
  <Step title="Get your credentials">
    Create an app to get your **Client ID** (a public identifier for your integration) and **Client Secret** (a private key you keep on your server). An "app" here is just how Fanvue issues you these credentials, you don't have to build or publish anything to use them.

    <Card title="Get your Client ID and Secret" icon="key" href="/docs/app-store/credentials" horizontal>
      Create an app in the Fanvue Builder area to generate your OAuth credentials.
    </Card>

    <Warning>The Client Secret is shown only once, at creation. Copy it somewhere safe before you leave the page. If you lose it, you'll have to regenerate it.</Warning>
  </Step>

  <Step title="Get an access token">
    Fanvue uses **OAuth 2.0** (an industry-standard way to grant apps access without sharing your password). Getting an access token is not a single command: a real person has to sign in and approve the request in the browser first. Here is the honest minimal version of what happens:

    1. You send the user to Fanvue's authorization page at `https://auth.fanvue.com/oauth2/auth`, asking for the **scopes** (the specific permissions your app needs) you want. For this call you need `read:self`, which grants read access to your own account.
    2. The user signs in and approves. Fanvue redirects back to your app with a short-lived authorization code.
    3. Your server exchanges that code (plus your Client ID and Secret) at `https://auth.fanvue.com/oauth2/token` for an **access token**.

    That access token is the value you'll use as your Bearer token in the next step. Access tokens are short-lived, typically one hour, so grab a fresh one if yours has expired.

    <Note>
      The full flow uses PKCE, the `state` parameter, and a token exchange. You don't need to memorize it now. The Quick Start runs the whole thing end to end with a working app so you can copy a token out and continue here.
    </Note>

    <Card title="Get a token with the OAuth Quick Start" icon="arrow-right" href="/docs/introduction/quick-start" horizontal>
      Run the Fanvue App Starter, sign in once, and obtain a real access token in minutes.
    </Card>
  </Step>

  <Step title="Make the call">
    Send a `GET` request to `https://api.fanvue.com/users/me` with two headers: your access token as a Bearer token, and the required API version. Replace `YOUR_ACCESS_TOKEN` with the token from the previous step.

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl https://api.fanvue.com/users/me \
          -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
          -H "X-Fanvue-API-Version: 2025-06-26"
        ```
      </Tab>

      <Tab title="Python">
        ```python theme={null}
        import requests

        response = requests.get(
            "https://api.fanvue.com/users/me",
            headers={
                "Authorization": "Bearer YOUR_ACCESS_TOKEN",
                "X-Fanvue-API-Version": "2025-06-26",
            },
        )

        print(response.status_code)
        print(response.json())
        ```
      </Tab>
    </Tabs>

    <Tip>A `401 Unauthorized` response means the token is missing, expired, or malformed. Get a fresh access token from Step 2 and try again. Make sure the word `Bearer` and a single space come before the token.</Tip>
  </Step>

  <Step title="See the response">
    A successful call returns `200 OK` and your account as JSON. Here's the shape you can expect:

    ```json theme={null}
    {
      "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "email": "you@example.com",
      "handle": "yourhandle",
      "displayName": "Your Name",
      "bio": "Creator on Fanvue",
      "isCreator": true,
      "createdAt": "2024-01-15T09:30:00.000Z",
      "updatedAt": "2025-04-02T14:12:00.000Z",
      "avatarUrl": "https://cdn.fanvue.com/avatars/yourhandle.jpg",
      "bannerUrl": null,
      "likesCount": 1280,
      "fanCounts": {
        "followersCount": 5400,
        "subscribersCount": 320
      },
      "contentCounts": {
        "imageCount": 210,
        "videoCount": 48,
        "audioCount": 3,
        "postCount": 175,
        "payToViewPostCount": 60
      }
    }
    ```

    If you see your own `handle` and `email` come back, your authentication works. You're ready to call the rest of the API.
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="OAuth App Quick Start" icon="rocket" href="/docs/introduction/quick-start">
    Build a working login flow with the Fanvue App Starter and get tokens automatically.
  </Card>

  <Card title="API Reference" icon="book" href="/docs/api-reference/overview">
    Browse every endpoint, with request and response details for each one.
  </Card>
</CardGroup>
