Step-by-step 2025 guide to integrating Bolt.new AI with Bing Ads to streamline setup, automate campaigns, and improve ad performance.

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 with Bing Ads, you do NOT connect “Bolt” itself to Bing Ads. Instead, you build a normal backend (Node.js or Python) inside Bolt’s workspace and connect THAT backend to Microsoft Advertising (formerly Bing Ads) using the official Microsoft Advertising API. Authentication is done through Microsoft Entra ID OAuth2, and from there you call the REST endpoints using standard HTTP requests. Inside bolt.new, you store the required secrets (client_id, client_secret, refresh_token) in environment variables, then you write API routes that talk to Bing Ads.
In short: you integrate with Bing Ads in Bolt.new the same way you would integrate with Bing Ads anywhere else — by implementing Microsoft’s OAuth flow, saving tokens, and calling their Advertising API from your server code.
You create a small backend inside Bolt.new that:
This is the real, correct, production‑valid way. There is no special Bolt or magical AI connector — you use standard API integration patterns.
This is the exact process you would follow inside Bolt.new or any real app.
// This example shows how to fetch an access token using your refresh token
// and then call the Microsoft Advertising "GetAccounts" endpoint.
// Imports
import fetch from "node-fetch";
// Load secrets from Bolt environment variables
const clientId = process.env.MICROSOFT_CLIENT_ID;
const clientSecret = process.env.MICROSOFT_CLIENT_SECRET;
const refreshToken = process.env.MICROSOFT_REFRESH_TOKEN;
// Function to get access token
async function getAccessToken() {
const tokenUrl = "https://login.microsoftonline.com/common/oauth2/v2.0/token";
const params = new URLSearchParams();
params.append("client_id", clientId);
params.append("client_secret", clientSecret);
params.append("refresh_token", refreshToken);
params.append("grant_type", "refresh_token");
params.append("scope", "https://ads.microsoft.com/ads.manage");
const resp = await fetch(tokenUrl, {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: params
});
const data = await resp.json();
return data.access_token; // usable for Bing Ads API calls
}
// Example API call
async function getAccounts() {
const token = await getAccessToken();
const resp = await fetch("https://ads.microsoft.com/Api/Advertiser/Accounts", {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
Accept: "application/json"
}
});
const data = await resp.json();
return data;
}
// Export a route your Bolt server can use
export async function GET() {
const result = await getAccounts();
return new Response(JSON.stringify(result), { status: 200 });
}
Bolt doesn’t do anything special here; it simply provides a browser workspace where your normal backend code runs. Everything else is done through standard Microsoft APIs.
You can prototype all of this in Bolt and later deploy the exact same code to a normal server (Vercel, AWS, Render, etc.).
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.