From a231c7d4560906f77692c8aa894dd083693ef6ec Mon Sep 17 00:00:00 2001 From: sohey Date: Tue, 28 Oct 2025 16:34:04 +0100 Subject: [PATCH 1/3] call out when using neynar --- docs/mini-apps/core-concepts/notifications.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/mini-apps/core-concepts/notifications.mdx b/docs/mini-apps/core-concepts/notifications.mdx index ac6ac769..22e594f2 100644 --- a/docs/mini-apps/core-concepts/notifications.mdx +++ b/docs/mini-apps/core-concepts/notifications.mdx @@ -38,14 +38,14 @@ Notification tokens are unique to each client app. This means a user can have se Create a webhook server to handle webhook events. - - The `data` object returned by `parseWebhookEvent` contains three key fields: - - **`fid`**: The user's FID - - **`appFid`**: The client's FID (the Base app is 309857) - - **`event`**: The event payload with type and notification details - - Always use both `fid` and `appFid` together to identify a unique user-client combination. - + + + This code uses Neynar to verify webhook events. Make sure you have: + 1. Signed up for a [Neynar API key](https://neynar.com) (free tier available) + 2. Set the `NEYNAR_API_KEY` environment variable in your project + + The `verifyAppKeyWithNeynar` function validates the JSON Signature. + ```ts app/api/webhook/route.ts expandable highlight={20-50} From 5963930c68d668108dd6b5cb0b43be4df9a74ff2 Mon Sep 17 00:00:00 2001 From: sohey Date: Tue, 28 Oct 2025 16:37:18 +0100 Subject: [PATCH 2/3] call out when using neynar --- docs/mini-apps/core-concepts/notifications.mdx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/mini-apps/core-concepts/notifications.mdx b/docs/mini-apps/core-concepts/notifications.mdx index 22e594f2..e6114eb9 100644 --- a/docs/mini-apps/core-concepts/notifications.mdx +++ b/docs/mini-apps/core-concepts/notifications.mdx @@ -39,12 +39,9 @@ Notification tokens are unique to each client app. This means a user can have se Create a webhook server to handle webhook events. - This code uses Neynar to verify webhook events. Make sure you have: 1. Signed up for a [Neynar API key](https://neynar.com) (free tier available) - 2. Set the `NEYNAR_API_KEY` environment variable in your project - - The `verifyAppKeyWithNeynar` function validates the JSON Signature. + 2. Set the `NEYNAR_API_KEY` environment variable in your project. ```ts app/api/webhook/route.ts expandable highlight={20-50} From 580d88dd27a578c87e6456dd02ea4962cfb800be Mon Sep 17 00:00:00 2001 From: sohey Date: Tue, 28 Oct 2025 18:11:46 +0100 Subject: [PATCH 3/3] added pre req --- .../mini-apps/core-concepts/notifications.mdx | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/mini-apps/core-concepts/notifications.mdx b/docs/mini-apps/core-concepts/notifications.mdx index e6114eb9..1e87d6b6 100644 --- a/docs/mini-apps/core-concepts/notifications.mdx +++ b/docs/mini-apps/core-concepts/notifications.mdx @@ -31,19 +31,26 @@ If your webhook processes token saving and sends notifications synchronously bef Notification tokens are unique to each client app. This means a user can have separate notification preferences for your Mini App across different clients (e.g., Farcaster, the Base app). Removing your Mini App in one client does not affect its status in other clients. - + +Set the NEYNAR_API_KEY environment variable in your project to avoid webhook verificiation errors. You may apply for a free tier [here](https://dev.neynar.com/)" + + +## Prerequisites + +Before implementing notifications, make sure you have a [Neynar API key](https://neynar.com) (free tier available) to verify webhook events from the Base app. + +Set the `NEYNAR_API_KEY` environment variable in your project: + +```bash .env.local +NEYNAR_API_KEY=your_api_key_here +``` + ## Implementation Create a webhook server to handle webhook events. - - This code uses Neynar to verify webhook events. Make sure you have: - 1. Signed up for a [Neynar API key](https://neynar.com) (free tier available) - 2. Set the `NEYNAR_API_KEY` environment variable in your project. - - ```ts app/api/webhook/route.ts expandable highlight={20-50} import {