A Node.js client library for interacting with the Toggl time tracking API. Currently at version 1.0.2, this package provides a simple wrapper around Toggl's REST API endpoints, supporting authentication via API tokens and enabling operations such as fetching time entries, projects, and workspaces. It is a lightweight, dependency-light solution for integrating Toggl into Node.js applications, though it lacks TypeScript definitions and has limited documentation. The library follows a callback-based pattern typical of older Node.js packages.
npm install toggl-apiVerified import paths — ran on the pinned version, not inferred.
Demonstrates creating a Toggl client with an API token, fetching time entries, and listing workspaces using callbacks.
Ensure you pass a valid Toggl API token string (not email/password) to the constructor.
Use util.promisify() to convert callback methods to Promise-based usage.
Create a .d.ts file or use a type assertion (any) for the client instance.
Implement custom error handling and check err object for status codes.
Consider migrating to a library supporting Toggl API v9 or directly calling the new API.
Ensure you do: const TogglClient = require('toggl-api'); const toggl = new TogglClient(token);Verify your Toggl API token from Toggl settings and ensure it is active.
Check your network connection and DNS settings. Ensure api.track.toggl.com is reachable.
No dependency data recorded yet.