Overview
The WhatsApp WAHA Dashboard includes a comprehensive user management system with role-based access control. Administrators can approve new users, manage permissions, and maintain security across the platform.User Roles
The system supports three distinct user roles:GUEST
Pending ApprovalNew registrations start as GUEST. Limited access until approved by admin.
USER
Standard AccessCan create campaigns, manage groups, and access core features.
ADMIN
Full AccessComplete control over users, campaigns, sessions, and system settings.
Registration & Approval Flow
How User Registration Works
User Signs Up
New users create an account with:
- Full name
- Email address
- Password (minimum 8 characters)
GUEST role automatically.Admin Notification
Administrators receive notifications via:
- WhatsApp - Sent to
ADMIN_PHONE_NUMBER(if configured) - Email - Sent to
ADMIN_EMAIL
If WhatsApp notification fails, the system automatically falls back to email notification.
Approval Decision
Admin can:
- Approve - Upgrade to USER role
- Reject/Delete - Remove the account
- Keep Pending - Leave as GUEST for later decision
Admin Dashboard
Accessing the Admin Panel
Administrators can access the admin dashboard at/admin or through the navigation menu.
Admin Dashboard Sections
The admin panel provides comprehensive oversight:- Pending Users
- Approved Users
- WhatsApp Sessions
- Active Campaigns
- WhatsApp Groups
View and manage pending registrations:
- User name and email
- Registration date
- Quick approve/reject actions
- Bulk operations (coming soon)
- Approve user (promote to USER role)
- Delete user (permanently remove)
Managing Users
Approving New Users
Promoting Users to Admin
Revoking User Access
To temporarily revoke access without deleting the account:Revoked users can be re-approved later without losing their data.
Deleting Users
Adding Users Directly (Admin)
Admins can create pre-approved user accounts:Notification Configuration
Email Notifications
Configure email notifications in your.env file:
WhatsApp Notifications
Enable WhatsApp notifications for new registrations:Notification Types
Admins receive notifications for:- New User Registrations - Both WhatsApp and email
- Password Changes - Email only (security)
- System Alerts - Email (critical issues)
Notification Fallback
The system implements a smart fallback strategy:Security Best Practices
Verify Users
Always verify user identity before approval, especially for sensitive organizations.
Limit Admins
Only promote trusted users to ADMIN role. Minimize the number of administrators.
Regular Audits
Periodically review user list and revoke access for inactive or departed users.
Strong Passwords
Enforce strong password requirements (8+ characters, complexity).
Monitor Activity
Regularly check campaign creation and message sending patterns.
Email Verification
Consider implementing email verification for additional security.
Role Permissions Matrix
| Feature | GUEST | USER | ADMIN |
|---|---|---|---|
| View Dashboard | ❌ | ✅ | ✅ |
| Connect WhatsApp | ❌ | ✅ | ✅ |
| View Groups | ❌ | ✅ | ✅ |
| Create Campaigns | ❌ | ✅ | ✅ |
| Edit Own Campaigns | ❌ | ✅ | ✅ |
| Delete Own Campaigns | ❌ | ✅ | ✅ |
| View Admin Dashboard | ❌ | ❌ | ✅ |
| Approve Users | ❌ | ❌ | ✅ |
| Manage All Users | ❌ | ❌ | ✅ |
| View All Campaigns | ❌ | ❌ | ✅ |
| View All Sessions | ❌ | ❌ | ✅ |
| System Configuration | ❌ | ❌ | ✅ |
Troubleshooting
Admin Notifications Not Received
Admin Notifications Not Received
Check these items:
- Email notifications:
- Verify
MAILGUN_API_KEYis correct - Check
ADMIN_EMAILis set - Review Mailgun dashboard for delivery status
- Check spam folder
- Verify
- WhatsApp notifications:
- Verify
ADMIN_PHONE_NUMBERformat (+1234567890) - Ensure WhatsApp session is connected
- Check WhatsApp session has permission to message admin
- Verify
- Logs:
Cannot Delete User
Cannot Delete User
Common causes:
- User is ADMIN - Cannot delete admin users for safety
- Database constraint - User has associated campaigns
- For admins: First demote to USER, then delete
- For users with campaigns: Campaigns will be orphaned (feature update needed)
User Can't Access After Approval
User Can't Access After Approval
Troubleshooting steps:
- Verify user role changed to USER in database
- Ask user to log out and log back in
- Clear browser cache and cookies
- Check for errors in browser console
- Verify session is valid
Cannot Access Admin Dashboard
Cannot Access Admin Dashboard
Verify:
- User role is ADMIN (not USER or GUEST)
- Check database:
db.user.findUnique({ where: { email: '[email protected]' }}) - Clear authentication cookies
- Restart application if roles were recently changed
API Reference
Key admin API endpoints (tRPC procedures):User Management
System Monitoring
Next Steps
Setup WhatsApp
Connect WhatsApp accounts for your users
Create Campaigns
Start creating message campaigns