/bolt-ai-integration

Bolt.new AI and Toggl integration: Step-by-Step Guide 2025

Learn how to connect Bolt.new AI with Toggl in 2026 using this clear step-by-step guide to boost productivity and automate time tracking.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free No-Code consultation

How to integrate Bolt.new AI with Toggl?

To integrate Bolt.new with Toggl, you don’t “connect Bolt to Toggl” directly — instead, you write frontend or backend code inside a Bolt.new workspace that calls the Toggl Track REST API using a Toggl API Token stored in Bolt environment variables. The integration works exactly like any other API-based integration: you authenticate using Basic Auth (your API token as username, the literal string "api_token" as password), then call Toggl’s endpoints (such as starting/stopping time entries). Bolt.new simply provides the place where you write, run, and test the code.

 

How the integration works

 

Bolt.new has no built‑in Toggl connector. You integrate by writing code in Bolt that communicates with Toggl’s official public API. Toggl exposes HTTP endpoints (URLs you call with JSON). Authentication is Basic Auth using the Toggl API Token you get from your Toggl profile. You store that token in Bolt.new under Project → Environment Variables so it isn’t leaked in your repo.

  • Toggl Track REST API is here: https://github.com/toggl/toggl_api_docs
  • Auth model: Basic Auth where username = API_TOKEN and password = api_token
  • Common operations: start time entry, stop time entry, get projects, get workspace data

 

Step‑by‑step: integrating Toggl inside Bolt.new

 

This shows the real, correct workflow and the exact code pattern you’d use.

  • Create a new Bolt.new workspace (Node.js or Next.js template works great).
  • Retrieve your Toggl API token: In Toggl Track → Profile → API Token.
  • Add environment variable in Bolt: TOGGL_API_TOKEN = your API token.
  • Create an API route in Bolt that calls Toggl’s REST endpoints.

 

Example: Start a Toggl time entry from Bolt.new

 

// File: api/start-timer.js
// This is a simple Bolt.new serverless route using Node.js fetch

export default async function handler(req, res) {
  try {
    const token = process.env.TOGGL_API_TOKEN;

    const authHeader = "Basic " + Buffer.from(`${token}:api_token`).toString("base64");

    const response = await fetch("https://api.track.toggl.com/api/v9/workspaces/123456/time_entries", {
      method: "POST",
      headers: {
        "Authorization": authHeader,
        "Content-Type": "application/json"
      },
      body: JSON.stringify({
        description: "Working from Bolt.new",
        created_with: "bolt.new",
        start: new Date().toISOString()
      })
    });

    const data = await response.json();
    res.status(200).json(data);

  } catch (err) {
    res.status(500).json({ error: err.message });
  }
}

 

  • You replace 123456 with your Toggl workspace ID.
  • This route can now be called from your Bolt frontend to start timers.
  • This code uses ONLY real Toggl API mechanics (no fictional APIs).

 

Example: Stop a Toggl time entry

 

To stop an entry, Toggl requires a PATCH request to the entry’s ID.

// File: api/stop-timer.js

export default async function handler(req, res) {
  try {
    const token = process.env.TOGGL_API_TOKEN;
    const { entryId } = req.query; // e.g. /api/stop-timer?entryId=987654321
    const authHeader = "Basic " + Buffer.from(`${token}:api_token`).toString("base64");

    const response = await fetch(`https://api.track.toggl.com/api/v9/time_entries/${entryId}/stop`, {
      method: "PATCH",
      headers: {
        "Authorization": authHeader,
        "Content-Type": "application/json"
      }
    });

    const data = await response.json();
    res.status(200).json(data);

  } catch (err) {
    res.status(500).json({ error: err.message });
  }
}

 

What you’ve achieved

 

  • Your Bolt.new app can authenticate with Toggl securely using environment variables.
  • You can start and stop time entries from any Bolt-based UI.
  • This same pattern applies to all other Toggl endpoints (projects, workspaces, reports).
  • When moving out of Bolt, the exact same code works in Vercel, Railway, or any Node server.

 

Important security and limitations

 

  • Toggl doesn’t support OAuth for Track API (only Basic Auth with API Token).
  • Tokens must never be exposed to the browser — always call Toggl from backend routes.
  • Bolt.new provides environment variables, but they exist only inside the workspace runtime.
  • Toggl rate limits apply — keep requests efficient.

 

This is the complete, real, correct method to integrate Toggl with Bolt.new: create backend routes inside Bolt that call Toggl’s REST API using a stored API token.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022