Skip to content
Last updated

Brevo integration

Brevo (formerly Sendinblue) is an email marketing, CRM, and automation platform. Integrating Brevo with Frontegg lets your application manage contacts and lists, create and send campaigns, and work with templates, senders, and webhooks on behalf of your users — all through Frontegg's integration layer using Brevo's OAuth 2.0 authorization.


Prerequisites

Connect Brevo

Brevo OAuth 2.0 applications are created with the Brevo CLI, not a web dashboard. The CLI generates your Client ID and Client Secret and registers the redirect URL that Brevo returns users to after they authorize access.

Step 1: Install the Brevo CLI

Install the CLI using your preferred package manager:

npm install -g @getbrevo/cli
# or: yarn global add @getbrevo/cli
# or: brew install getbrevo/tap/brevo

Step 2: Log in to Brevo

Authenticate the CLI with your Brevo account. This opens a browser sign-in and saves your credentials to ~/.brevo/credentials.json.

brevo login

Step 3: Create the OAuth application

Run the guided setup and follow the prompts:

brevo app init

When prompted, provide:

  • App name — A descriptive name, for example Frontegg Integration.
  • Distribution type — Choose public if the app will connect multiple Brevo accounts through Frontegg.
  • OAuth callback URL — Enter your Frontegg Redirect URL:
    • https://YOUR_MCP_GATEWAY_URL/integration-callback

Step 4: Set the required scopes

New apps are seeded with contacts:read, contacts:write, crm:read, and crm:write. Add the remaining scopes this integration uses — email campaigns, transactional email templates, account senders, and webhooks:

brevo app update \
  --scope campaigns.email:read --scope campaigns.email:write \
  --scope transactional.email:read \
  --scope account:read --scope account:write \
  --scope webhooks:read --scope webhooks:write

Run brevo app available-scopes to see every scope you can grant.

Step 5: Copy the Client ID and Client Secret

The CLI writes your client_id and client_secret to src/oauth/.env.local. Open that file and copy both values.

Keep your Client Secret safe

The .env.local file is gitignored for a reason — never commit it. Store the Client Secret on the server side only and never expose it in client-side code.

Configure the Frontegg portal

Once you have your Client ID and Client Secret, configure the integration in the Frontegg portal:

  1. Open the Frontegg portal and navigate to [ENVIRONMENT] → Integrations → Brevo.
  2. Enter the Client ID and Client Secret.
  3. Select the required scopes:
ScopeDescription
contacts:readRead contacts and lists
contacts:writeCreate, update, and delete contacts and lists
campaigns.email:readRead email campaigns
campaigns.email:writeCreate, update, and send email campaigns
transactional.email:readRead email templates
account:readRead account senders
account:writeCreate and manage account senders
webhooks:readRead webhooks
webhooks:writeCreate and delete webhooks
  1. Click Save.

When a user connects their Brevo account, Brevo shows a consent screen listing these permissions before granting access.

Keep your credentials secure

Never share or commit your Client Secret to version control.

Additional resources