Learn how to connect Bolt.new AI with Box in 2026 using a simple step-by-step setup to boost workflow automation and file management.

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 Box, you treat Box like any other external API: you authenticate using Box’s real OAuth 2.0 flow or a Box Service Account (via JWT), store the credentials as environment variables inside your Bolt.new project, and call Box’s REST API from your backend routes. Bolt.new itself does not have a “Box integration button”—your backend code performs the integration exactly the same way you would in a normal Node/Express app. In practice, this means you set up an OAuth redirect route or use a JWT-based service account, then use Box’s official SDK or direct HTTPS requests to upload, download, and search files.
Bolt.new is just your development workspace. Your actual integration is your backend code calling Box’s API. The steps look like this:
Everything else is normal Node.js API integration.
Box offers two real authentication models:
Both work with Bolt.new. Your choice depends on whether a human needs to sign in.
Inside developer.box.com:
Then in Bolt you install the Box SDK:
npm install box-node-sdk
Example Express routes for OAuth inside Bolt.new:
// boxAuth.js
import express from "express";
import axios from "axios";
const router = express.Router();
// Step 1: Redirect user to Box login
router.get("/auth/box", (req, res) => {
const authUrl =
"https://account.box.com/api/oauth2/authorize" +
`?response_type=code&client_id=${process.env.BOX_CLIENT_ID}` +
`&redirect_uri=${encodeURIComponent(process.env.BOX_REDIRECT_URI)}`;
res.redirect(authUrl);
});
// Step 2: Box redirects back with a code
router.get("/auth/box/callback", async (req, res) => {
const code = req.query.code;
const tokenUrl = "https://api.box.com/oauth2/token";
try {
const response = await axios.post(
tokenUrl,
new URLSearchParams({
grant_type: "authorization_code",
code: code,
client_id: process.env.BOX_CLIENT_ID,
client_secret: process.env.BOX_CLIENT_SECRET,
})
);
// Save the access token somewhere (temporary store, DB, etc.)
const tokens = response.data;
res.json(tokens);
} catch (e) {
res.status(500).json({ error: e.message });
}
});
export default router;
This is the exact real flow that Box uses. It works inside Bolt because Bolt’s backend container is just Node.js.
If you don’t want user login, Box provides a JWT method. You configure a “Custom App (JWT)” in Box, download a JSON config file, and place the values inside Bolt.new environment variables.
SDK example:
// boxServiceAccount.js
import BoxSDK from "box-node-sdk";
const sdk = new BoxSDK({
clientID: process.env.BOX_CLIENT_ID,
clientSecret: process.env.BOX_CLIENT_SECRET,
appAuth: {
keyID: process.env.BOX_JWT_KID,
privateKey: process.env.BOX_JWT_PRIVATE_KEY,
passphrase: process.env.BOX_JWT_PASSPHRASE,
},
});
const client = sdk.getAppAuthClient("enterprise", process.env.BOX_ENTERPRISE_ID);
export default client;
Once you have the client, you can call Box APIs directly:
// Upload example
const file = await client.files.uploadFile(
process.env.BOX_ROOT_FOLDER_ID,
"example.txt",
Buffer.from("hello from Bolt")
);
In Bolt.new, you add env vars in the left sidebar under Environment. Box secrets MUST NOT be hardcoded.
Bolt automatically injects them into process.env at runtime.
With routes running in Bolt.new, you test like this:
Bolt.new is fully capable of making real HTTPS calls to Box’s API. There are no special adapters required.
Once your integration works in Bolt.new, you deploy the same Node.js backend to your real environment (Vercel, Render, AWS, etc.). You simply copy the same environment variables to your production environment.
No code changes are required. Box API works identically.
Integrating Bolt.new with Box is simply integrating your backend code with Box’s REST API. Use OAuth or JWT, put credentials in Bolt.new env vars, install the Box SDK, and call the standard Box endpoints. Bolt.new is just your workspace—the integration lives in normal Node.js code that communicates with Box’s real API endpoints.
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.