{"id":19732223,"url":"https://github.com/lifeomic/twilio-webhook-validator-koa","last_synced_at":"2025-04-30T02:32:01.165Z","repository":{"id":34260398,"uuid":"172768947","full_name":"lifeomic/twilio-webhook-validator-koa","owner":"lifeomic","description":"Koa middleware for Twilio webhook request validation","archived":false,"fork":false,"pushed_at":"2024-09-11T19:57:13.000Z","size":1257,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-10-03T09:30:59.144Z","etag":null,"topics":["koa","team-skillspring","twilio"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lifeomic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-02-26T18:42:32.000Z","updated_at":"2024-09-11T19:57:16.000Z","dependencies_parsed_at":"2023-10-11T15:49:37.157Z","dependency_job_id":"f88fb4db-8d88-4d51-adc6-8718f57502c3","html_url":"https://github.com/lifeomic/twilio-webhook-validator-koa","commit_stats":{"total_commits":75,"total_committers":7,"mean_commits":"10.714285714285714","dds":0.4666666666666667,"last_synced_commit":"aaabe8edf475c66eb4cee114e7cd4af433a6ed38"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifeomic%2Ftwilio-webhook-validator-koa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifeomic%2Ftwilio-webhook-validator-koa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifeomic%2Ftwilio-webhook-validator-koa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifeomic%2Ftwilio-webhook-validator-koa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lifeomic","download_url":"https://codeload.github.com/lifeomic/twilio-webhook-validator-koa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224194745,"owners_count":17271519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["koa","team-skillspring","twilio"],"created_at":"2024-11-12T00:25:20.045Z","updated_at":"2024-11-12T00:25:20.539Z","avatar_url":"https://github.com/lifeomic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# twilio-webhook-validator-koa\n\n[![npm](https://img.shields.io/npm/v/@lifeomic/twilio-webhook-validator-koa.svg)](https://www.npmjs.com/package/@lifeomic/twilio-webhook-validator-koa)\n[![Build Status](https://travis-ci.org/lifeomic/twilio-webhook-validator-koa.svg?branch=master)](https://travis-ci.org/lifeomic/twilio-webhook-validator-koa)\n[![Greenkeeper badge](https://badges.greenkeeper.io/lifeomic/twilio-webhook-validator-koa.svg)](https://greenkeeper.io/)\n\nKoa middleware that provides Twilio request validation to Twilio webhooks.\n\n# Example usage\n\n```typescript\nimport * as Koa from 'koa';\nimport * as Router from 'koa-router';\nimport * as bodyParser from 'koa-bodyparser';\nimport { webhookValidator } from '@lifeomic/twilio-webhook-validator-koa';\n\nconst app = new Koa();\nconst router = new Router();\n\nrouter.post(\n  '/twilio',\n  bodyParser(),\n  webhookValidator({\n    authToken: process.env.TWILIO_AUTH_TOKEN\n  }),\n  (ctx) =\u003e {\n    ctx.body = `\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cResponse\u003e\n  \u003cSay\u003eTwilio request validation succeeded!\u003c/Say\u003e\n\u003c/Response\u003e`;\n  }\n);\n\napp.use(router.routes()).listen(3000);\n```\n\n# Example usage with custom host and protocol (e.g. behind a proxy)\n\n```typescript\nwebhookValidator({\n  authToken: process.env.TWILIO_AUTH_TOKEN,\n  host: ctx.header['x-forwarded-host'],\n  protocol: ctx.header['x-forwarded-proto']\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifeomic%2Ftwilio-webhook-validator-koa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flifeomic%2Ftwilio-webhook-validator-koa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifeomic%2Ftwilio-webhook-validator-koa/lists"}