1
Create an API key in the Whop Developer Dashboard and save it on your server as Create an API key
WHOP_API_KEY.
This key will allow you to perform actions within the context of your company. Keep it on the server. Never put it in browser, mobile, or client-side code.
2
Install the SDK in your backend:
Install packages
- Next.js
- Express
- cURL
- React
- HTML
- iOS
3
Enroll your own users as connected accounts before minting chat tokens. This creates a Whop account you can map back to your platform user.
Get a user ID for your users
- Next.js
- Express
- cURL
owner_user.id in the response) on your side and pass it as user_id when you create chat access tokens.
See company-specific profiles for more details on how to update users avatars and display names.
4
Add an endpoint that calls Create a token endpoint on your server
POST https://api.whop.com/api/v1/access_tokens with your API key and returns the resulting token to the client.
- Next.js
- Express
- cURL
app/api/chat/token/route.ts
5
All chat types use real-time messaging and can render in the Chat element. Pick the type based on your needs:
Create or fetch a channel, DM, or support chat
Channels
A shared chat for public or large group conversations. Rooms with moderation, read-only options, and no fixed member cap.
Direct messages
A private conversation between users. They show in the DMs list and can include up to 50 members.
Support chat
A one-on-one support conversation between a user and your company. Customers see them like DMs; admins manage them through a support inbox instead of the DMs list.
- Channels IDs start with
chat_feed_. - DMs and support chats IDs start with
feed_.
6
This will use the token endpoint you created to fetch a token and render the chat element. The SDK is responsible of managing the token and refreshing it when necessary.
Render chat in your app
- React
- HTML
- iOS
Next steps
Authentication
Choose between company-scoped tokens and OAuth for embedded chat.
Sync your users
Create or map Whop users before minting company-scoped chat tokens.
Chat element
Learn the props, events, styles, and deeplinking options for the chat UI.
DMs list element
Show a list of a user’s direct message conversations.

