Learn how to connect Bolt.new AI with Keap using this simple 2025 step-by-step integration guide to boost automation and workflow efficiency.

Book a call with an Expert
Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.
To integrate Bolt.new AI with Keap, you don’t “connect bolt to Keap” directly — instead, you build a normal full‑stack app inside bolt.new (Node/Express, Next.js API routes, or similar), and that app talks to Keap using Keap’s REST API with proper OAuth2 authentication. Bolt.new is just the workspace; the integration happens through API calls your app makes from inside the Bolt sandbox. The core steps are: create a Keap OAuth app, store your Keap Client ID/Secret in bolt environment variables, implement the OAuth token exchange in your API route, persist the access/refresh token, and call Keap’s REST endpoints (contacts, tags, automations, etc.). That’s it — it’s a standard OAuth2 + REST API integration.
You integrate Keap by treating it as a normal external service with a public REST API. Keap exposes endpoints like /contacts, /opportunities, /tags, etc. The only tricky piece is the OAuth2 flow.
This is the exact practical flow you would implement inside bolt.new.
// /api/keap/auth.js
// Step 1: Redirect user to Keap login
export default function handler(req, res) {
const params = new URLSearchParams({
client_id: process.env.KEAP_CLIENT_ID,
redirect_uri: process.env.KEAP_REDIRECT_URI,
response_type: "code",
scope: "full"
});
res.redirect(`https://accounts.infusionsoft.com/app/oauth/authorize?${params}`);
}
// /api/keap/callback.js
// Step 2: Exchange code for access_token and refresh_token
export default async function handler(req, res) {
const code = req.query.code;
const body = new URLSearchParams({
code,
client_id: process.env.KEAP_CLIENT_ID,
client_secret: process.env.KEAP_CLIENT_SECRET,
grant_type: "authorization_code",
redirect_uri: process.env.KEAP_REDIRECT_URI
});
const tokenResp = await fetch("https://api.infusionsoft.com/token", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body
});
const tokens = await tokenResp.json();
// In a real app, store tokens in DB or secure storage
console.log("Keap tokens:", tokens);
res.send("Keap connected. Tokens received.");
}
// /api/keap/contacts.js
// Requires a valid access_token (from your stored tokens)
export default async function handler(req, res) {
const accessToken = process.env.KEAP_ACCESS_TOKEN; // Store this after OAuth
const response = await fetch("https://api.infusionsoft.com/crm/rest/v1/contacts", {
headers: {
Authorization: `Bearer ${accessToken}`
}
});
const data = await response.json();
res.json(data);
}
Keap API access tokens always expire. You must refresh them via:
Bolt.new environment variables only persist in the project; for production deployments, move them to real environment config (like Vercel, Railway, etc.).
Bolt.new itself never stores Keap data — your app does. Bolt is just the workspace in which the full‑stack app runs.
This is the correct, real, production-valid way to integrate Keap with an app built inside Bolt.new.
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.