Documentation

All Docs

Sessions

Connecting WhatsApp numbers to your bots.

What is a Session?

A session is a WhatsApp number connected to Neuron. Bots send and receive on a session. Neuron supports two ways to connect a number: the official WhatsApp Cloud API (via Meta Business) and a Baileys direct connection (pairs with any WhatsApp number via QR code). Each has different setup requirements and capabilities.

Don't confuse a session with a WhatsApp Channel: a session is your connected number, whereas "WhatsApp Channels" are one-way newsletters. See the Newsletters section.

WhatsApp Cloud API

The official integration through Meta. Requires a Meta Business account, a verified WhatsApp Business phone number, and a permanent access token. Go to Settings > WhatsApp Sessions, add a Cloud API (Meta) session, and enter your Phone Number ID and Access Token.

  1. 1

    Create a Meta Business app

    Go to developers.facebook.com, create an app, and add the WhatsApp product.

  2. 2

    Get your credentials

    Copy your Phone Number ID and generate a permanent access token from the WhatsApp > API Setup page.

  3. 3

    Configure the webhook

    In your Meta app's WhatsApp webhook settings, set the callback URL to your Neuron instance: https://neuron-api.dlvh.site/api/v1/whatsapp/webhook. Use the verify token from your environment variables.

  4. 4

    Create the session

    In Neuron, go to Settings > WhatsApp Sessions, add a new Cloud API (Meta) session, and enter your credentials.

Baileys Direct Connection

Pairs with any WhatsApp number using a QR code — no Meta Business account needed. Open Sessions, add a Direct (Baileys) session, start it, and scan the QR code with your WhatsApp mobile app.

Baileys connections use an unofficial WhatsApp protocol. They may be less stable than the official Cloud API and could be affected by WhatsApp policy changes.

Assigning Bots

After connecting a session, assign a bot to it. Go to the session's detail page and click "Assign Bot". Only one bot can be active per session at a time. Messages received on that session are routed to the assigned bot.

Session Management

For Baileys sessions, you can start, stop, and check status. The Sessions page shows all your connections. If a session disconnects (e.g., the phone goes offline), you may need to re-scan the QR code to reconnect.