Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions docs/mini-apps/core-concepts/notifications.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,11 @@ Notification tokens are unique to each client app. This means a user can have se
<Step title="Create a webhook server">
Create a webhook server to handle webhook events.

<Info>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing this?

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.
</Info>
<Info>
Copy link
Contributor

@hughescoin hughescoin Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a warning under the <Info> to say this. Since the info above is helpful and not setting the neynar API key will result in an error.

<Warning>
Set the `NEYNAR_API_KEY` environment variable in your project to complete webhook verification. You can request a free API key [here](https://dev.neynar.com/).
</Warning>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hughescoin resolved now

Prerequisites

Before implementing notifications, make sure you have a Neynar API key (free tier available) to verify webhook events from the Base app.

Set the NEYNAR_API_KEY environment variable in your project:

NEYNAR_API_KEY=your_api_key_here

it has to be a pre req because the code cant run without this

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.
</Info>

```ts app/api/webhook/route.ts expandable highlight={20-50}

Expand Down