toggl-webhook
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

toggl-webhook

This module provides a wrapper for the toggl track webhook api.

Install

npm install --save toggl-webhook

Warning: This package is native ESM and does not provide a CommonJS export. If your project uses CommonJS, you'll have to convert to ESM or use the dynamic import() function. Please don't open issues for questions regarding CommonJS / ESM.

Usage

import { TogglWebhookClient } from 'toggl-webhook';

const client = new TogglWebhookClient({
  apiToken: 'XXX',
  userAgent: 'bob@example.com'
});

const subscription = await client.createSubscription({
  workspace_id: 10000,
  url_callback: 'https://example.com/hook',
  event_filters: [{entity: 'project', action: 'create'}],
  description: 'unique subscription description',
  secret: 'shhhh',
  enabled: true
});

API docs

See the API docs.

Recieve and validate webhook events with express

toggl-webhook-express provides a middleware to validate incoming toggl webhook requests.

Dependents (0)

Package Sidebar

Install

npm i toggl-webhook

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

51.5 kB

Total Files

19

Last publish

Collaborators

  • pixtron