Slack Error: 'not_enough_users' — Cause, Fix, and Troubleshooting Guide
Fix the Slack not_enough_users error: conversations.open was called without enough valid user IDs. Pass at least one real user for a DM.
- #slack
- #api
- #troubleshooting
- #errors
Stuck on this Slack error? Get the free incident triage checklist
A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.
Overview
not_enough_users is returned by conversations.open when you didn’t supply enough valid users to open a conversation. Opening a DM needs a real user; opening a multi-person DM (MPIM) needs enough distinct users.
{
"ok": false,
"error": "not_enough_users"
}
Symptoms
conversations.openfails with an empty or malformedusersvalue.- A group-DM open fails when only one user (or none) resolves.
- The error appears before any message is sent.
Common Root Causes
1. Empty users parameter
A code path builds the users string from a list that turned out empty (all filtered/invalid), sending nothing.
2. Only invalid/duplicate ids
After deduping or validation, no real user remains — e.g. the only id was the bot itself or a bad value.
3. MPIM with too few distinct users
A multi-person DM needs at least two distinct human users; supplying one isn’t enough.
How to diagnose
Reproduce with an empty list:
curl -s -X POST https://slack.com/api/conversations.open \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"users":""}'
{"ok": false, "error": "not_enough_users"}
A valid single user opens a DM fine:
curl -s -X POST https://slack.com/api/conversations.open \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"users":"U0USER0001"}'
{"ok": true, "channel": {"id": "D0DM000001"}}
Fixes
- Validate the user list before calling: ensure at least one real
U…id remains after filtering. - Resolve emails/names to ids first (
users.lookupByEmail) and drop anything that fails to resolve. - For MPIMs, pass a comma-separated list of at least two distinct human users.
- Guard the call: short-circuit if the resolved list is empty rather than calling the API with nothing.
What to watch out for
not_enough_users(too few valid users) differs fromtoo_many_users(over the MPIM cap) anduser_not_found(a specific id didn’t resolve).- Don’t include the bot’s own id to pad the list — it won’t count as another participant.
- Bad email lookups silently drop users; log which ids failed to resolve so an empty list is obvious.
Related
- Slack Error: ‘user_not_found’
- Slack Error: ‘cannot_dm_bot’
- Ephemeral Slack messages for quieter ops bots
Fixed it? Get 500 Slack & DevOps AI prompts — free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.
Did this fix your issue?
Get 500 Battle-Tested DevOps AI Prompts — Free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.