{"id":28515954,"url":"https://github.com/keygen-sh/example-webhook-handler","last_synced_at":"2025-07-24T23:42:05.733Z","repository":{"id":54137449,"uuid":"116040553","full_name":"keygen-sh/example-webhook-handler","owner":"keygen-sh","description":"An example Node.js app that handles webhook events from Keygen","archived":false,"fork":false,"pushed_at":"2022-12-07T18:59:28.000Z","size":19,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T00:38:32.262Z","etag":null,"topics":["keygen","platform-example","sample-code","webhook-events","webhook-handler","webhook-server"],"latest_commit_sha":null,"homepage":"https://keygen.sh","language":"JavaScript","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/keygen-sh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-02T17:33:50.000Z","updated_at":"2021-06-10T14:38:08.000Z","dependencies_parsed_at":"2023-01-24T20:30:42.791Z","dependency_job_id":null,"html_url":"https://github.com/keygen-sh/example-webhook-handler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/keygen-sh/example-webhook-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keygen-sh%2Fexample-webhook-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keygen-sh%2Fexample-webhook-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keygen-sh%2Fexample-webhook-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keygen-sh%2Fexample-webhook-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keygen-sh","download_url":"https://codeload.github.com/keygen-sh/example-webhook-handler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keygen-sh%2Fexample-webhook-handler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263778318,"owners_count":23509972,"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":["keygen","platform-example","sample-code","webhook-events","webhook-handler","webhook-server"],"created_at":"2025-06-09T03:31:26.223Z","updated_at":"2025-07-05T17:30:56.101Z","avatar_url":"https://github.com/keygen-sh.png","language":"JavaScript","readme":"# Example Keygen Webhook Handler\nThe following web app is written in Node.js and shows how to set up a simple\nwebhook handler for [Keygen](https://keygen.sh), allowing you to listen for\nand act upon particular events on your Keygen account.\n\n\u003e **This example application is not 100% production-ready**, but it should\n\u003e get you 90% of the way there. You may need to add additional logging,\n\u003e error handling, validation, features, etc.\n\n## Running the app\n\nFirst up, configure a few environment variables:\n```bash\n# Your Keygen account's Ed25519 verify key\nexport KEYGEN_VERIFY_KEY=\"YOUR_KEYGEN_ED25519_VERIFY_KEY\"\n\n# Your Keygen account ID.\nexport KEYGEN_ACCOUNT_ID=\"YOUR_KEYGEN_ACCOUNT_ID\"\n```\n\nYou can either run each line above within your terminal session before\nstarting the app, or you can add the above contents to your `~/.bashrc`\nfile and then run `source ~/.bashrc` after saving the file.\n\nNext, install dependencies with [`yarn`](https://yarnpkg.comg):\n```\nyarn\n```\n\nThen start the app:\n```\nyarn start\n```\n\n## Testing webhooks locally\n\nFor local development, create an [`ngrok`](https://ngrok.com) tunnel:\n```\nngrok http 8080\n```\n\nNext up, add the secure `ngrok` URL to your Keygen account to listen\nfor webhook events.\n\n1. **Keygen:** add `https://{YOUR_NGROK_URL}/keygen` to https://app.keygen.sh/webhook-endpoints\n\nYou can now create events within your Keygen account, e.g. create a new\nlicense, and the webhook event will be sent to your local server.\n\n## Questions?\n\nReach out at [support@keygen.sh](mailto:support@keygen.sh) if you have any\nquestions or concerns!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeygen-sh%2Fexample-webhook-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeygen-sh%2Fexample-webhook-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeygen-sh%2Fexample-webhook-handler/lists"}