Skip to main content
Authorize a sample OnlyFans account in Sandbox and read its profile through the HTTP API.

Authorize a Sandbox account

  1. Create a Sandbox client and register your backend callback URL.
  2. Build an authorization URL with the profile:read scope, state, and an S256 PKCE challenge. Save the state and verifier on your server for the callback.
  3. Open the URL and approve a sample account. When the browser returns, validate the callback and exchange the code for tokens.

Select the account

Set ACCESS_TOKEN on your backend from the token response. List the accounts shared with your app:
Choose the sample account from data and set LINKED_ACCOUNT_ID to its id.

Read the profile

The response contains the sample account’s ID, username, and name. Sandbox returns simulated provider data. Keep tokens and client secrets on your backend. Tokens and refresh describes expiry, renewal, and revocation.