API keys
An Account API key authenticates your server as one account. An App API key authenticates your app across every account that installed it. Both are secrets: keep them server-side.Create an Account API key
Use an Account API key when your server acts for your own account and its subaccounts. In the dashboard’s Developer page, open Account API Keys and select Create. The Quickstart walks through it in the sandbox.Create an App API key
Use an App API key when you build an app and need to reach data on the accounts that installed it.- In the dashboard, open Apps.
- Select Create app and give your app a name. You can change the name later.
- Your key is the hidden value after
WHOP_API_KEYin the Environment variables section. Use the reveal button to show it, then store it somewhere safe.
Account-scoped user tokens
An account-scoped user token acts as one specific user inside one specific account. Your server mints it with your API key and hands it to your client, so your users reach Whop without ever signing in to Whop. Create one withPOST /api/v1/access_tokens, passing account_id, user_id, and the actions you want to allow:
account_id starts with biz_ and user_id starts with user_. Your API key must have permission to reach both.
Tokens expire in one hour by default. Set expires_at to change that, up to a three-hour maximum. Mint them on demand rather than caching them.
See Create access token.
Scoping a token
scoped_actions is the list of things the token may do. Each entry is a colon-separated action string.
An action must be a subset of the minting credential’s own permissions. You can’t grant what your API key doesn’t have.
These actions appear across Whop’s guides today:
The API doesn’t publish a fixed list, so treat this as the documented set rather than the complete one. The authoritative bound is always the minting credential’s own permissions.
Account access tokens
An account access token acts as the account itself, with no user attached. Create one withPOST /api/v1/access_tokens, passing only account_id and the scoped_actions to allow. It expires on the same schedule as an account-scoped user token.
Use it when a client needs your account’s access for a short time, such as an embedded component, and no specific user is involved. Endpoints that act as a user, like notification or preference endpoints, reject it.
iframe user tokens
When your app renders inside Whop, every same-origin request carries a short-lived JWT in the x-whop-user-token header. You verify its signature to learn who is asking, then check what they may see. The Python and Ruby SDKs ship a helper for this. The TypeScript SDK doesn’t, so verify the JWT yourself.
You never mint this one. Whop sends it, and you validate it. See Authentication.
OAuth tokens
An OAuth token represents a user who signed in to Whop and approved your app for a set of scopes. Unlike an API key, its reach is bounded by what that individual user can do. Use it for Sign in with Whop, and for acting on a user’s behalf against their own account. See OAuth.Scoping checklist
Before a credential reaches production:- Pass explicit
scoped_actionson every minted token. Never rely on inheritance. - Give API keys a custom permission set once you know which endpoints you call, rather than leaving them on Admin.
- Keep API keys server-side. Only user tokens belong in a client.
- Mint short-lived tokens on demand instead of caching long-lived ones.
- Use separate credentials per environment, and check which one you are holding before running anything that moves money.
Next steps
Quickstart
Create a sandbox key and make your first call.
Core Concepts
How accounts, users, and permissions relate.
OAuth
The full OAuth 2.1 and PKCE flow.
Test in the sandbox
Try credentials against test data first.

