Neynar webhooks are a way to receive real-time updates about events on the Farcaster protocol. You can use webhooks to build integrations that respond to events on the protocol, such as when a user creates a cast or when a user updates their profile.
@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:
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: