Skip to main content

API endpoint

This tutorial uses the GET v2/notifications endpoint
Show follow, like, recast, reply, quote and mention notifications for a given user.
notifications

Get notifications for a given user fid

In this example, we will try to create a notifications page for the given user.

Prerequisites

  • Install Node.js
  • Optional: Install Yarn (Alternatively, npm can be used)

Project Setup

Initialize Project Directory
Install Neynar SDK along with typescript Install using npm
// or Install using Yarn
Initialize typescript environment

Implementation

Create index.ts file at root level
Add imports
Instantiate the client
Call fetchAllNotifications function to get feed

Running the project

Result

You should now see an output like this

Summary

You can use this to show a notification on your client! You get all the data in one request, making it easy to display or use in your next operation. If you want to try getting a live response, head over to our API page for v2/feed. You can take the cursor from the output and pass it in the next request to the SDK to page to the next set of results.

Ready to start building?

Get your subscription at neynar.com and reach out to us on Slack with any questions!