Connecting Marketing Cloud Engagement
Set up Salesforce Marketing Cloud Engagement as an integration in MeshMesh
Connecting Marketing Cloud Engagement
This guide walks you through connecting your Salesforce Marketing Cloud Engagement (SFMC) account to MeshMesh. Once connected, MeshMesh can manage Data Extensions, Journeys, Automations, Email content, Transactional Sends, and more.
MeshMesh uses the Public App integration type with Authorization Code grant, so no client secret is needed. Each user authenticates with their own SFMC account, providing a full audit trail.
What You Need
- Admin access to your Marketing Cloud Engagement account (to create an Installed Package)
- Your Marketing Cloud subdomain (the
mc...part of your API URLs)
Prerequisites
- A Salesforce Marketing Cloud Engagement account
- Admin access to Setup > Platform Tools > Apps > Installed Packages
- Your tenant-specific subdomain (found in your MC API URLs)
Step 1: Create an Installed Package
Log in to Marketing Cloud Engagement and navigate to Setup > Platform Tools > Apps > Installed Packages.
Click New to create a new Installed Package.
Give it a name (e.g., "MeshMesh Studio") and an optional description. Click Save.
Step 2: Add a Public App API Integration
In your new Installed Package, click Add Component.
Select API Integration and click Next.
Select Public App as the integration type. This is important — Public App does not require a client secret, which is more secure for desktop applications.
Configure the integration:
-
Redirect URI: Pick the one that matches where your team uses MeshMesh. Marketing Cloud only allows a single redirect URI per Installed Package.
- Desktop app:
https://auth.meshmesh.io/sfmc-callback - Web app:
https://studio.meshmesh.io/auth/sfmc-callback
If your team uses both, you'll need a separate Installed Package (and a separate MeshMesh connection) for each — see the note below.
- Desktop app:
-
Scope: Select the scopes your team needs. For full MeshMesh functionality, enable:
Data Extensions(Read, Write)Automations(Read, Write, Execute)Journeys(Read, Write, Execute)Email(Read, Write, Send)Contacts(Read, Write)Tracking Events(Read)Saved Content(Read, Write)List and Subscribers(Read, Write)
Click Save. Note the Client ID — you'll need it in MeshMesh.
No Client Secret Needed
Since you selected Public App, there is no client secret. This is the correct and most secure configuration for MeshMesh. Do not use "Web App" or "Server-to-Server" integration types.
Step 3: Find Your API Base URIs
After saving, your Installed Package summary page will show:
- Authentication Base URI: e.g.,
https://mc1234567890.auth.marketingcloudapis.com - REST Base URI: e.g.,
https://mc1234567890.rest.marketingcloudapis.com
Copy both of these URIs.
Step 4: Connect in MeshMesh
In MeshMesh Studio, click Integrations in the top bar.
Select Salesforce Marketing Cloud Engagement from the list.
Enter a name for the connection (e.g., "Production MCE").
Fill in the Installed Package details:
- Client ID: From your Installed Package
- Auth Base URI: Your authentication base URI
- REST Base URI: Your REST API base URI
- Account ID (MID): Optional — only needed if using multiple business units
Click Connect with Marketing Cloud. Your browser will open to the Marketing Cloud login page.
Log in with your Marketing Cloud credentials. After successful authentication, you'll be redirected back to MeshMesh Studio.
Each user who needs to use the SFMC integration must authenticate with their own Marketing Cloud account. This ensures all actions are traceable to individual users.
How Authentication Works
MeshMesh uses the OAuth 2.0 Authorization Code grant type with a Public App integration:
- You click "Connect" and log in to Marketing Cloud via your browser
- Marketing Cloud sends an authorization code to MeshMesh's callback server
- The server exchanges the code for an access token and refresh token
- The refresh token is stored securely in MeshMesh's encrypted vault
- Only short-lived access tokens (~20 minutes) are sent to the agent sandbox
- Tokens are automatically refreshed — no manual re-authentication needed
Security highlights:
- No client secret is used or stored anywhere
- Refresh tokens are stored server-side only, never on your device
- Access tokens expire in ~20 minutes and are refreshed automatically
- All actions use your personal Marketing Cloud identity for full audit trails
- Refresh token rotation is supported — if Marketing Cloud issues a new refresh token, it's automatically updated
Troubleshooting
"Invalid redirect URI" error
Your Installed Package's redirect URI must match the MeshMesh app you're connecting from:
https://auth.meshmesh.io/sfmc-callbackfor the desktop apphttps://studio.meshmesh.io/auth/sfmc-callbackfor the web app
Marketing Cloud only allows one redirect URI per Installed Package. If you originally set up your Installed Package for the desktop app and now want to connect from the web app (or vice versa), you'll need to create a new Installed Package with the matching redirect URI and a new MeshMesh connection that uses it. Your existing connection will keep working on the surface it was set up for.
Using MeshMesh from both desktop and web
Because each Installed Package can register only one redirect URI, set up two Installed Packages — one with the desktop URI, one with the web URI — and create a separate MeshMesh connection for each (e.g. "Production MCE — Desktop" and "Production MCE — Web"). Both can authenticate the same Marketing Cloud users.
"Insufficient permissions" error
Check that your Installed Package has the required scopes enabled, and that your Marketing Cloud user account has the necessary permissions.
Connection expires
Access tokens are refreshed automatically. If your refresh token expires (e.g., after extended inactivity), you'll need to reconnect by clicking "Connect" again in the Integrations panel.
Multi-Business Unit setup
If your Marketing Cloud account has multiple business units, enter the Account ID (MID) of the business unit you want to connect to. You can create separate connections for different business units.