Skip to main content

Brevo Integration

Connect OneTap Login to Brevo (formerly Sendinblue) to automatically add Google sign-in users to your email list.

Prerequisites

  • Brevo account (free tier available)
  • At least one list created
  • API key generated
  • (Optional) DOI template created

Step 1: Get Brevo API Key

1.1 Access API Settings

  1. Log into Brevo
  2. Click your name (top right)
  3. Click SMTP & API
  4. Select API Keys tab

1.2 Create API Key

  1. Click Generate a new API key
  2. Name it "OneTap Login"
  3. Copy the key

API Key Format:

xkeysib-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx

Step 2: Get List ID

2.1 Find Your List

  1. Go to Contacts > Lists
  2. Click on your target list
  3. Note the List ID shown

2.2 Copy List ID

The List ID is displayed on the list page:

List ID: 5

Or in the URL when viewing the list.

Step 3: Configure OneTap Login

3.1 Access Settings

  1. Go to WordPress Admin
  2. Navigate to Settings > OneTap Login
  3. Click Integrations tab
  4. Find Email Marketing section

3.2 Enter Credentials

Brevo Settings

  1. Enable Email Marketing: Toggle on
  2. Provider: Select Brevo
  3. API Key: Paste your API key
  4. List ID: Enter your List ID
  5. DOI Template ID: (Optional) For double opt-in

3.3 Test Connection

  1. Click Test Connection
  2. Verify success message
  3. Click Save Changes

Double Opt-in (DOI) Setup

Brevo offers advanced DOI configuration.

Step 1: Create DOI Template

  1. Go to Templates > Email Templates
  2. Click New Template
  3. Design your confirmation email
  4. Include confirmation link: {{ doiurl }}
  5. Save and note the Template ID

Step 2: Create Redirect Page

  1. In Settings > DOI & Double Opt-in
  2. Set confirmation redirect URL
  3. This is where users land after confirming

Step 3: Configure in OneTap

Brevo DOI Template Field

  1. Enter DOI Template ID in OneTap settings
  2. Save changes

DOI Flow

1. User signs up via Google
2. Added to list (not confirmed)
3. DOI email sent using your template
4. User clicks confirmation link
5. User confirmed, redirected to your page

Configuration Options

Contact Attributes

Brevo receives:

OneTap FieldBrevo Attribute
EmailEMAIL
First NameFIRSTNAME
Last NameLASTNAME

Custom Attributes

Create custom attributes in Brevo:

  1. Go to Contacts > Attributes
  2. Create attribute (e.g., SIGNUP_SOURCE)
  3. Map in OneTap if available

Subscriber Status

With DOI Enabled

New contact → Added to list

DOI email sent

User clicks confirm

Contact marked as opted-in

Without DOI

New contact → Added to list (active)

Verification

Check Contact

  1. Go to Brevo Contacts
  2. Search for test email
  3. Verify contact exists
  4. Check list membership

Check DOI Status

  1. Click on contact
  2. View Activity tab
  3. Check opt-in status

API Rate Limits

Brevo limits vary by plan:

PlanRequests/Day
Free300
LiteBased on plan
PremiumHigher limits

OneTap uses minimal API calls.

Error Messages

"Invalid API Key"

Cause: Wrong or inactive API key.

Solution:

  1. Verify API key in Brevo dashboard
  2. Check key hasn't been revoked
  3. Generate new key if needed

"List Does Not Exist"

Cause: Wrong List ID.

Solution:

  1. Verify List ID in Brevo
  2. Use numeric ID
  3. Check list isn't deleted

"Contact Already Exists"

Cause: Email already in Brevo.

Solution: Normal. Brevo updates existing contacts.

"Template Not Found"

Cause: Wrong DOI Template ID.

Solution:

  1. Verify template exists
  2. Use numeric template ID
  3. Check template is active

Brevo-Specific Features

SMS Marketing

Brevo supports SMS. While OneTap doesn't send SMS directly, you can:

  1. Capture phone in WooCommerce
  2. Sync to Brevo
  3. Use Brevo automations

Transactional Emails

Brevo excels at transactional emails:

  • Consider for welcome emails
  • Better deliverability than WordPress
  • Track opens/clicks

Automations

Create automation workflows:

  1. Go to Automation
  2. Create new workflow
  3. Trigger: Contact added to list
  4. Add welcome series

Segmentation

Create segment of Google users:

  1. Go to Contacts > Segments
  2. Condition: Added from [OneTap source]

Integration Code

How OneTap Calls Brevo

// Simplified example
$response = wp_remote_post(
'https://api.brevo.com/v3/contacts',
[
'headers' => [
'api-key' => $api_key,
'Content-Type' => 'application/json'
],
'body' => json_encode([
'email' => $email,
'attributes' => [
'FIRSTNAME' => $first_name,
'LASTNAME' => $last_name
],
'listIds' => [(int)$list_id],
'updateEnabled' => true
])
]
);

// If DOI enabled, trigger DOI
if ($doi_template_id) {
wp_remote_post(
'https://api.brevo.com/v3/contacts/doubleOptinConfirmation',
[
'headers' => [...],
'body' => json_encode([
'email' => $email,
'templateId' => (int)$doi_template_id,
'redirectionUrl' => $redirect_url
])
]
);
}

Troubleshooting

Connection Test Fails

  1. Verify API key format (starts with xkeysib-)
  2. Check API key permissions
  3. Ensure account is verified
  4. Try new API key

DOI Email Not Sending

  1. Verify DOI Template ID
  2. Check template is active
  3. Test template manually in Brevo
  4. Check email deliverability

Contact Not in List

  1. Check list ID is correct
  2. Verify list is active
  3. Check Brevo blacklist
  4. Review API response logs

Best Practices

Do's

  • Use DOI for GDPR compliance
  • Create custom DOI template
  • Set up welcome automation
  • Monitor deliverability scores

Don'ts

  • Don't exceed rate limits
  • Don't use personal email as sender
  • Don't skip DOI for EU contacts

Next Steps