API Selection Guide
Zoom Team Chat offers two distinct APIs for different use cases. Choose the right one before you start building.
Zoom Team Chat offers two distinct APIs for different use cases. Choose the right one before you start building.
Zoom Team Chat offers **two distinct APIs** for different use cases. Choose the right one before you start building.
Pick one of these integration types before writing code:
Most implementation issues come from mixing user-type auth with bot-type endpoints (or the opposite).
| Use Case | API to Use | Messages Appear As | |----------|------------|-------------------| | Send notifications from scripts/CI/CD | **Team Chat API** | Authenticated user | | Automate messages as a user | **Team Chat API** | Authenticated user | | Build an interactive chatbot | **Chatbot API** | Your bot | | Respond to slash commands | **Chatbot API** | Your bot | | Create messages with buttons/forms | **Chatbot API** | Your bot | | Handle user interactions | **Chatbot API** | Your bot |
The Team Chat API allows your application to send messages **as an authenticated user**. Messages appear in Team Chat as if the user sent them manually.
✅ **Use Team Chat API when:**
| Aspect | Details | |--------|---------| | **Authentication** | User OAuth (authorization_code flow) | | **Endpoint** | `POST https://api.zoom.us/v2/chat/users/me/messages` | | **Message Format** | Plain text or markdown | | **Scopes** | `chat_message:write`, `chat_channel:read` | | **User Experience** | Messages appear from the authenticated user |
User: "Build #123 completed successfully" User: "Daily sales report: $10,000" User: "Reminder: Team meeting in 15 minutes"The Chatbot API allows your application to send messages **as a bot**. Bots can send rich, interactive messages with buttons, forms, images, and handle user interactions via webhooks.
✅ **Use Chatbot API when:**
| Aspect | Details | |--------|---------| | **Authentication** | Client Credentials grant | | **Endpoint** | `POST https://api.zoom.us/v2/im/chat/messages` | | **Message Format** | Rich cards with components | | **Scopes** | `imchat:bot` (auto-added) | | **User Experience** | Messages appear from your bot | | **Interactivity** | Buttons, forms, dropdowns, webhooks |
Bot: "How can I help you?"
[Help Center] [Contact Support] [Report Bug] Bot: "Expense Report: $500"
Branch: main
Requester: John
[Approve] [Reject] User: "/ask What's the weather?"
Bot: "The weather in San Francisco is 72°F and sunny."| Feature | Team Chat API | Chatbot API | |---------|---------------|-------------| | **Plain Text Messages** | ✅ | ✅ | | **Markdown** | ✅ | ✅ | | **Rich Cards** | ❌ | ✅ | | **Buttons** | ❌ | ✅ | | **Forms** | ❌ | ✅ | | **Dropdowns** | ❌ | ✅ | | **Images** | ✅ (basic) | ✅ (rich) | | **Slash Commands** | ❌ | ✅ | | **Webhooks** | ❌ | ✅ | | **Button Click Handling** | ❌ | ✅ | | **Form Submissions** | ❌ | ✅ |
**Flow**: authorization_code **Requires**: User login and consent **Token Scope**: User's data only
// Step 1: Redirect user to OAuth consent page
const authUrl = `https://zoom.us/oauth/authorize?response_type=code&client_id=${CLIENT_ID}&redirect_uri=${REDIRECT_URI}`;
// Step 2: Exchange auth code for access token
const tokens = await exchangeCodeForToken(code);
// Step 3: Use access token to send messages
fetch('https://api.zoom.us/v2/chat/users/me/messages', {
headers: { 'Authorization': `Bearer ${tokens.access_token}` }
});**Flow**: client_credentials **Requires**: No user login **Token Scope**: Bot actions only
// Step 1: Get bot token (no user interaction)
const credentials = Buffer.from(`${CLIENT_ID}:${CLIENT_SECRET}`).toString('base64');
const response = await fetch('https://zoom.us/oauth/token', {
method: 'POST',
headers: { 'Authorization': `Basic ${credentials}` },
body: 'grant_type=client_credentials'
});
const { access_token } = await response.json();
// Step 2: Use access token to send bot messages
fetch('https://api.zoom.us/v2/im/chat/messages', {
headers: { 'Authorization': `Bearer ${access_token}` }
});**Yes!** You can use both APIs in the same application.
**Example**: Task management app
Need rich interactive messages?
├─ Yes → Chatbot API
└─ No
└─ Need webhooks (slash commands, button clicks)?
├─ Yes → Chatbot API
└─ No
└─ Messages should appear as user?
├─ Yes → Team Chat API
└─ No → Chatbot API**Reality**: Chatbots require **General App (OAuth)**, not Server-to-Server OAuth. S2S apps don't support the Chatbot feature.
**Reality**: Only Chatbot API supports interactive components (buttons, forms, dropdowns).
**Reality**: Chatbot API uses client_credentials flow (no user login needed).
**Reality**: Use `https://zoom.us/oauth/token` for token exchange. Keep `https://zoom.us/oauth/authorize` for the user consent step.
**Reality**: You can use both APIs in the same application.