MailerLite Integration
Connect OneTap Login to MailerLite to automatically add Google sign-in users to your email list.
Prerequisites
- MailerLite account (free tier available)
- At least one group created
- API key generated
Step 1: Get MailerLite API Key
1.1 Access Integrations
- Log into MailerLite
- Click Integrations in the sidebar
- Click API
1.2 Generate API Token
- Click Generate new token
- Name it "OneTap Login"
- Copy the token
API Token Format:
eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...
Make sure you're using the new API (v2). The token starts with eyJ.
Step 2: Get Group ID
2.1 Find Your Group
- Go to Subscribers > Groups
- Click on your target group
- Look at the URL
2.2 Copy Group ID
The Group ID is in the URL:
https://dashboard.mailerlite.com/groups/12345678/subscribers
^^^^^^^^
Group ID
Or via API settings:
- Go to Integrations > API
- Find group ID in the documentation
Step 3: Configure OneTap Login
3.1 Access Settings
- Go to WordPress Admin
- Navigate to Settings > OneTap Login
- Click Integrations tab
- Find Email Marketing section
3.2 Enter Credentials

- Enable Email Marketing: Toggle on
- Provider: Select MailerLite
- API Key: Paste your API token
- Group ID: Paste your Group ID
3.3 Test Connection
- Click Test Connection
- Verify success message
- Click Save Changes
Configuration Options
Double Opt-in
Configure in MailerLite:
- Go to Forms > Settings
- Enable Double opt-in
- Customize confirmation email
OneTap Login adds subscribers as "unconfirmed" when DOI is enabled.
Subscriber Fields
MailerLite receives:
| OneTap Field | MailerLite Field |
|---|---|
| First Name | name (first part) |
| Last Name | name (last part) |
Custom Fields
If you have custom fields in MailerLite:
- Create field in MailerLite
- Map in OneTap settings (if available)
- Or use automations to populate
Subscriber Status
With Double Opt-in
New subscriber → status: "unconfirmed"
↓
Confirmation email sent
↓
User clicks confirm
↓
Status: "active"
Without Double Opt-in
New subscriber → status: "active"
Verification
Check Subscriber
- Go to MailerLite Subscribers
- Search for test email
- Verify subscriber exists
- Check group membership
Check Activity
- Click on subscriber
- View Activity tab
- See subscription event
API Rate Limits
MailerLite limits:
- 120 requests per minute
- Generous for typical use
OneTap Login makes one request per registration.
Error Messages
"Invalid API Key"
Cause: Wrong or expired API token.
Solution:
- Generate new API token
- Ensure using API v2 token
- Copy full token
"Group Not Found"
Cause: Wrong Group ID.
Solution:
- Verify Group ID in MailerLite
- Check group isn't deleted
- Use numeric ID, not name
"Subscriber Already Exists"
Cause: Email already in MailerLite.
Solution: Normal behavior. Existing subscribers are updated, not duplicated.
"Validation Failed"
Cause: Invalid email format.
Solution: Check email address is valid. Google emails should always be valid.
MailerLite-Specific Features
Segments
Create segment of Google users:
- Go to Subscribers > Segments
- Create new segment
- Condition: Group is [your group]
Automations
Trigger automation on subscription:
- Create automation in MailerLite
- Set trigger: When subscriber joins a group
- Select your Google signup group
Landing Pages
MailerLite offers landing pages. Consider:
- Custom Google signup landing page
- Post-signup redirect to landing page
Integration Code
How OneTap Calls MailerLite
// Simplified example
$response = wp_remote_post(
'https://connect.mailerlite.com/api/subscribers',
[
'headers' => [
'Authorization' => 'Bearer ' . $api_key,
'Content-Type' => 'application/json'
],
'body' => json_encode([
'email' => $email,
'fields' => [
'name' => $first_name . ' ' . $last_name
],
'groups' => [$group_id],
'status' => 'unconfirmed' // or 'active'
])
]
);
Troubleshooting
Connection Test Fails
- Verify API token is v2 (starts with
eyJ) - Check token hasn't been revoked
- Ensure account is active
- Try generating new token
Subscribers Not Appearing
- Check DOI: User may need to confirm
- Verify correct group selected
- Check MailerLite spam/bounced list
- Review OneTap debug logs
Group Not Updating
- Verify Group ID is numeric
- Check group still exists
- Ensure API has write permissions
MailerLite Classic vs New
OneTap Login supports the new MailerLite (connect.mailerlite.com).
If using MailerLite Classic:
- Migrate to new MailerLite
- Or contact support for classic API key format
Best Practices
Do's
- Enable double opt-in
- Create dedicated group for Google signups
- Set up welcome automation
- Monitor deliverability
Don'ts
- Don't use Classic API keys
- Don't delete the signup group
- Don't share API tokens
Next Steps
- Marketing Consent - GDPR consent UI
- Email Marketing Overview - Compare providers
- MailChimp Setup - Alternative provider