Client Sessions

Create Client Session

Changed on

Create Client Session Token for later use in embedded auth components - eg. via @onlyfansapi/auth npm package.

post/api/client-sessions

Request

  • Base URL
    https://app.onlyfansapi.com
  • URL
    https://app.onlyfansapi.com/api/client-sessions
  • Auth
    HTTP bearer

Request body

display_namestring required

Display Name of the account visible in your OnlyFansAPI Console Dashboard.

client_reference_idstring

Your Internal Reference ID for the connected account.

proxy_country'us' | 'uk' | 'gb' nullable
scopesstring[]

Account access scopes. Defaults to ["*"] for full access. account.read is always included in limited access.

app_namestring

App name shown on the access screen. Required when scopes is not ["*"].

Example request

{
  "display_name": "STRLCxGLVC Agency / Model: Stella",
  "client_reference_id": "my_crm_model_12345",
  "proxy_country": "gb",
  "scopes": [
    "tracking-links.read",
    "trial-links.read",
    "smart-links.read"
  ],
  "app_name": "OnlySearch"
}

Response

Success

Example response

{
  "data": {
    "token": "ofapi_cs_OriR8Sdocp0f97eFOdbMMZtiz4Aw5FLX",
    "display_name": "STRLCxGLVC Agency / Model: Stella",
    "client_reference_id": "my_crm_model_12345"
  },
  "_meta": {
    "_credits": {
      "used": 0,
      "balance": 224907,
      "note": "Always"
    },
    "_cache": {
      "is_cached": false,
      "note": "Cache disabled for this endpoint"
    },
    "_rate_limits": {
      "limit_minute": 1000,
      "limit_day": 50000,
      "remaining_minute": 999,
      "remaining_day": 49999
    }
  }
}

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new gb enum value to the request property

    • breaking

      removed the enum value cz of the request property

    • breaking

      removed the enum value de of the request property

    • breaking

      removed the enum value es of the request property

    • breaking

      removed the enum value fr of the request property

    • breaking

      removed the enum value hu of the request property

    • breaking

      removed the enum value it of the request property

    • breaking

      removed the enum value pl of the request property

    • breaking

      removed the enum value ro of the request property

    • breaking

      removed the enum value sk of the request property

    • breaking

      removed the enum value ua of the request property