Getting Credentials
This page covers how to obtain API credentials for each messaging platform and email provider. These steps are only needed for self-hosted deployments. If you are using the hosted version, credentials are already configured.
Discord
1. Create an application
- Go to the Discord Developer Portal
- Click New Application, give it a name (e.g. "MailFellow"), and click Create
2. Create a bot
- In your application, go to Bot in the left sidebar
- Click Reset Token to generate a bot token
- Copy the token. You will not be able to see it again.
3. Enable required intents
On the same Bot page, scroll down to Privileged Gateway Intents and enable:
- Message Content Intent:required for reading message content in threads
4. Generate the invite URL
- Go to OAuth2 in the left sidebar
- Under OAuth2 URL Generator, select the bot scope
- Under Bot Permissions, select:
- Send Messages, Create Public Threads, Send Messages in Threads
- Manage Threads, Manage Channels, Embed Links
- Attach Files, Manage Webhooks, Read Message History
- Add Reactions, Use Slash Commands
- Copy the generated URL. This is your Bot Invite URL
5. Enter in MailFellow
Go to Admin > Platform and enter:
| Field | Value |
|---|---|
| Bot Token | Token from step 2 |
| Bot Invite URL | URL from step 4 |
Slack
For self-hosted deployments, MailFellow uses Slack's Socket Mode which does not require a public URL.
1. Create a Slack app
- Go to Slack API: Your Apps
- Click Create New App, choose From scratch
- Name it (e.g. "MailFellow") and select your workspace
2. Enable Socket Mode
- Go to Socket Mode in the left sidebar
- Toggle Enable Socket Mode on
- Give the app-level token a name (e.g. "mailfellow-socket") and click Generate
- Copy this
xapp-token. This is your App Token.
3. Configure bot permissions
- Go to OAuth & Permissions
- Under Bot Token Scopes, add:
chat:write,chat:write.customizechannels:history,channels:read,channels:managefiles:write,reactions:read,commands
4. Enable event subscriptions
- Go to Event Subscriptions
- Toggle Enable Events on
- Under Subscribe to bot events, add:
message.channels,reaction_added - Click Save Changes
5. Enable interactivity
- Go to Interactivity & Shortcuts
- Toggle Interactivity on
- Click Save Changes (no URL needed since Socket Mode handles it)
6. Install to workspace
- Go to Install App
- Click Install to Workspace and authorize
- Copy the
xoxb-token. This is your Bot Token.
7. Enter in MailFellow
Go to Admin > Platform and enter:
| Field | Value |
|---|---|
| Bot Token | xoxb- token from step 6 |
| App Token | xapp- token from step 2 |
Telegram
1. Create a bot with BotFather
- Open Telegram and search for @BotFather
- Send
/newbot - Choose a display name (e.g. "MailFellow Email")
- Choose a username ending in
bot(e.g.mailfellow_email_bot) - Copy the bot token (looks like:
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11)
2. Configure commands (recommended)
In BotFather, send /setcommands and paste:
send - Send a new email
quick - Reply with a saved quick response
assign - Assign this email thread
unassign - Remove assignment
start - Get your Chat ID and help info3. Enter in MailFellow
Go to Admin > Platform and enter the Bot Token.
WhatsApp requires the WhatsApp Business Platform (Cloud API) from Meta.
1. Create a Meta App
- Go to Meta for Developers
- Click Create App, select Business type
- Name your app and select your Meta Business account
2. Add WhatsApp and get credentials
- In the app dashboard, find WhatsApp and click Set up
- Go to WhatsApp > API Setup and copy the Phone Number ID
- Get a permanent access token from Meta Business Suite > System Users:
- Create a System User with Admin role
- Generate a token with
whatsapp_business_messagingandwhatsapp_business_managementpermissions
- Get your Business Account ID from WhatsApp Accounts
3. Configure the webhook
- In your Meta App, go to WhatsApp > Configuration
- Set Callback URL to:
https://your-domain.com/api/whatsapp/webhook - Set a Verify Token (a secret string of your choice)
- Subscribe to
messageswebhook field - Copy the App Secret from App Settings > Basic
4. Enter in MailFellow
Go to Admin > Platform and enter:
| Field | Value |
|---|---|
| Access Token | System User permanent token |
| Phone Number ID | From API Setup page |
| Business Account ID | From WhatsApp Accounts |
| Webhook Verify Token | The secret string you chose |
| App Secret | From App Settings |
Microsoft Teams
1. Register an Azure Bot
- Go to the Azure Portal - Create Azure Bot
- Fill in: Bot handle, Subscription, Resource group, Pricing tier (Free F0), Type: Multi Tenant
- Click Review + create, then Create
2. Get App ID and Secret
- In the bot's Configuration, copy the Microsoft App ID
- Click Manage Password, go to Certificates & secrets
- Click New client secret and copy the Value
3. Set the messaging endpoint
In the bot's Configuration, set Messaging endpoint to: https://your-domain.com/api/teams/webhook
4. Enable the Teams channel
- In your Azure Bot resource, go to Channels
- Click Microsoft Teams and accept the terms
5. Enter in MailFellow
Go to Admin > Platform and enter:
| Field | Value |
|---|---|
| App ID (Client ID) | Microsoft App ID |
| App Secret (Client Secret) | Client secret value |
Mattermost
1. Enable bot accounts
- Go to Mattermost System Console > Integrations > Bot Accounts
- Set Enable Bot Account Creation to true
2. Create a bot
- Go to Integrations > Bot Accounts (from main menu)
- Click Add Bot Account
- Username:
mailfellow, Role: System Admin - Copy the Access Token
3. Enable interactive messages
- Go to System Console > Integrations > Integration Management
- Enable: Incoming Webhooks, Outgoing Webhooks, Interactive Messages
4. Enter in MailFellow
Go to Admin > Platform and enter:
| Field | Value |
|---|---|
| Server URL | e.g. https://mattermost.example.com |
| Bot Token | Access token from step 2 |
Gmail (Google OAuth)
You need a Google Cloud project with the Gmail API enabled.
- Go to the Google Cloud Console - Credentials
- Create a new project (or select an existing one)
- Go to APIs & Services > Library, search for Gmail API, and click Enable
- Go to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Choose Web application
- Add your redirect URI:
https://your-domain.com/auth/google/callback - Click Create
- Copy the Client ID and Client Secret
If this is a new project, configure the OAuth consent screen:
- Go to APIs & Services > OAuth consent screen
- Choose External user type
- Fill in app name, support email, and developer email
- Add scopes:
gmail.readonly,gmail.send,gmail.modify - Add your email as a test user (required while app is in "Testing" mode)
- To allow anyone to connect, submit for verification
Outlook (Microsoft OAuth)
You need an Azure AD app registration with Microsoft Graph permissions.
- Go to the Azure Portal - App registrations
- Click New registration
- Name it (e.g. "MailFellow"), select Accounts in any organizational directory and personal Microsoft accounts
- Set redirect URI to Web:
https://your-domain.com/auth/outlook/callback - Click Register
- Copy the Application (client) ID
- Go to Certificates & secrets, click New client secret, copy the Value
- Go to API permissions > Add a permission > Microsoft Graph > Delegated permissions:
Mail.Read,Mail.Send,offline_access,User.Read
- Click Grant admin consent if you are the admin