Cloudflare webhook
Worker to forward Patreon posts to Discord
See on GitHub
To check for compatibility with this package, look if your platform:
AbortController
, setTimeout
, clearTimeout
, fetch
, URL
and URLSearchParams
v18
or higherES2020
createHmac
of the node:crypto
module (to verify Patreon webhook requests)WARNING
This is a server-side API & Oauth package and requires your application tokens. Make sure you do not share or expose your tokens or run this code client-side.
Tip: the Patreon API blocks browser requests, so choose a backend to handle Oauth2 request and return the data to your frontend.
This package exports both CJS and ESM code. However, the guide will only have ESM examples.
npm install patreon-api.ts
pnpm add patreon-api.ts
yarn add patreon-api.ts
The default API version for this package is 2
and might change in major versions.
CAUTION
This package does not include v1 of the Patreon API and starts with API v2. The sections in the Patreon documentation are prefixed by APIv2:
. The Oauth flow, introduction and sections below sorting are related to all versions.
When the default API version is changed, old versions will still receive updates. You can not import this module by API version since it is unlikely that Patreon will release a new version any time soon.
To get started you can see one of the examples:
or read more about the features your application needs.