Related set of APIs: Create a webhook
@neynar/nodejs-sdk
, so let’s install that as well:
script.ts
file:

.env
file with the name NEYNAR_API_KEY
.
Now, let’s test our api but to do that we’ll need an api which we can call. In the index.ts
file add the following:
bun run index.ts
and we’ll use ngrok to serve it. If you don’t already have it installed, install it from here. Once it’s installed, authenticate using your auth token and serve your app using this command:
Free endpoints like ngrok, localtunnel, etc. can have issues because service providers start blocking events over a certain limit
YOUR_NGROK_URL_HERE
in the previous script. Once you’ve done that, run the script using bun run script.ts
and it should create a webhook for you like this:
