Full OAuth guide
See the general OAuth guide for the complete OAuth 2.1 + PKCE flow, token exchange, refresh, and revocation details.
Setup
- API
- Dashboard
Use the Create App endpoint to create an OAuth app programmatically:Update redirect URIs later with the Update App endpoint.
Required scopes
Your OAuth configuration should include these scopes:| Scope | Purpose |
|---|---|
openid, profile, email | Basic profile info |
chat:message:create, chat:read | Channels |
dms:read, dms:message:manage, dms:channel:manage | Direct messages |
support_chat:read, support_chat:message:create | Support chats |
Web token endpoint
Your server needs to provide a token endpoint that returns a valid OAuth token with the required scopes. The React and vanilla JavaScript chat elements call this function whenever they need to authenticate.SDK-managed OAuth on iOS
CallconfigureWithOAuth on app launch. The SDK handles the entire flow: showing a sign-in webview, obtaining tokens, and refreshing them automatically.
com.yourapp.bundle://oauth/callback). You can customize this:
Tracking authentication state
Use the.whopAuthState modifier to reactively track whether the user is signed in:
Pre-filling tokens
If you already have the user’s Whop tokens from another source, such as a web OAuth flow or tokens synced from your backend, you can pre-fill them to skip the sign-in webview on first launch. This is optional and only relevant if your users have already authenticated with Whop elsewhere.Next steps
Authentication
Compare OAuth with company-scoped tokens for embedded chat.
General OAuth guide
Implement the full OAuth flow, token exchange, refresh, and revocation.
Chat element
Learn the props, events, styles, and deeplinking options for the chat UI.
Embedded chat quickstart
Render your first embedded chat experience.

