# webhooks-methods.js
> Methods to handle GitHub Webhook requests
[](https://www.npmjs.com/package/@octokit/webhooks-methods)
[](https://github.com/octokit/webhooks-methods.js/actions?query=workflow%3ATest+branch%3Amain)
Table of contents
- [usage](#usage)
- [Methods](#methods)
- [`sign()`](#sign)
- [`verify()`](#verify)
- [`verifyWithFallback()`](#verifyWithFallback)
- [Contributing](#contributing)
- [License](#license)
| Browsers | 🚧 `@octokit/webhooks-methods` is not meant to be used in browsers. The webhook secret is a sensitive credential that must not be exposed to users. Load `@octokit/webhooks-methods` directly from [cdn.skypack.dev](https://cdn.skypack.dev) ```html ``` |
|---|---|
| Node | Install with `npm install @octokit/core @octokit/webhooks-methods` ```js const { sign, verify, verifyWithFallback, } = require("@octokit/webhooks-methods"); ``` |
secret
(String)
|
Required. Secret as configured in GitHub Settings. |
algorithm
(String)
|
Algorithm to calculate signature. Can be set to `sha1` or `sha256`. `sha1` is supported for legacy reasons. GitHub Enterprise Server 2.22 and older do not send the `X-Hub-Signature-256` header. Defaults to `sha256`. Learn more at [Validating payloads from GitHub](https://docs.github.com/en/developers/webhooks-and-events/securing-your-webhooks#validating-payloads-from-github) |
eventPayloadString
(String)
|
Required.
Webhook request payload as received from GitHub. If you have only access to an already parsed object, stringify it with JSON.stringify(payload)
|
secret
(String)
|
Required. Secret as configured in GitHub Settings. |
eventPayloadString
(String)
|
Required.
Webhook request payload as received from GitHub. If you have only access to an already parsed object, stringify it with JSON.stringify(payload)
|
signature
(String)
|
Required.
Signature string as calculated by sign().
|
secret
(String)
|
Required. Secret as configured in GitHub Settings. |
eventPayloadString
(String)
|
Required.
Webhook request payload as received from GitHub. If you have only access to an already parsed object, stringify it with JSON.stringify(payload)
|
signature
(String)
|
Required.
Signature string as calculated by sign().
|
additionalSecrets
(Array of String)
|
If given, each additional secret will be tried in turn. |