{"id":17215435,"url":"https://github.com/pixtron/toggl-webhook-express","last_synced_at":"2026-04-17T00:02:10.988Z","repository":{"id":40517576,"uuid":"507595245","full_name":"pixtron/toggl-webhook-express","owner":"pixtron","description":"Express middleware to validate toggl webhook requests","archived":false,"fork":false,"pushed_at":"2022-06-27T15:48:41.000Z","size":147,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T20:57:50.671Z","etag":null,"topics":["express","middleware","toggl","webhook"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/toggl-webhook-express","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixtron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-26T14:24:26.000Z","updated_at":"2022-06-27T15:34:00.000Z","dependencies_parsed_at":"2022-07-29T06:18:01.650Z","dependency_job_id":null,"html_url":"https://github.com/pixtron/toggl-webhook-express","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/pixtron/toggl-webhook-express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixtron%2Ftoggl-webhook-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixtron%2Ftoggl-webhook-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixtron%2Ftoggl-webhook-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixtron%2Ftoggl-webhook-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixtron","download_url":"https://codeload.github.com/pixtron/toggl-webhook-express/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixtron%2Ftoggl-webhook-express/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31909235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","middleware","toggl","webhook"],"created_at":"2024-10-15T03:24:24.544Z","updated_at":"2026-04-17T00:02:10.950Z","avatar_url":"https://github.com/pixtron.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# toggl-webhook-express\n\n## Install\n\n```\nnpm install --save toggl-webhook\n```\n\n## Usage\n\n```ts\nimport express from 'express';\nimport { webhookHandler } from 'toggl-webhook-express';\n\nconst app = express();\nconst port = 3001;\n\napp.use(express.json());\n\nconst webhook = webhookHandler({\n  secretProvider: 'shhhh' // same secret as used in your webhook subscription\n});\n\napp.post('/hook/', webhook, (req, res) =\u003e {\n  const { body } = req;\n\n  console.log('valid webhook event recieved', {date: new Date(), body});\n  res.json({status: 'OK'});\n});\n```\n\n### Provide a secret based on incoming request\n\n```ts\nconst webhook = webhookHandler({\n  secretProvider: async (req: Request): Promise\u003cstring | null\u003e =\u003e {\n    // return secret based on request params (eg. based on userId)\n  }\n});\n```\n\n### Disable autoValidate\n\nBy default all incoming ping requests that have a `validation_code` set in the body are [validated](https://developers.track.toggl.com/docs/webhooks_start/url_endpoint_validation) by default. All other ping requests are just logged. To disable this feature set `autoValidate` to false.\n\n```ts\nconst webhook = webhookHandler({\n  autoValidate: false\n});\n```\n\n### Provide a custom logger\n\n```ts\nimport { Logger } from 'toggl-webhook-express';\n\nclass MyLogger implements Logger {\n  info(msg: string, tag: string, meta: unknown) {\n    console.info(tag, msg, meta);\n  }\n  warning(msg: string, tag: string, meta: unknown) {\n    console.warn(tag, msg, meta);\n  }\n}\n\nconst webhook = webhookHandler({\n  logger: new MyLogger()\n});\n```\n\n## Create a subscription\n\n[toggl-webhook](https://www.npmjs.com/package/toggl-webhook) provides a node.js API wrapper for the [toggl webhook api](https://developers.track.toggl.com/docs/webhooks/subscriptions).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixtron%2Ftoggl-webhook-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixtron%2Ftoggl-webhook-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixtron%2Ftoggl-webhook-express/lists"}