Skip to main content
This tutorials uses the Neynar nodejs sdk

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: Let’s use sdk to look up a user by their FID

Create index.ts file at root level
Add the following code in index.ts

Running the project

Result

You should see a response like this. (You might not get a beautified/ formatted response since we JSON.stringify the response to log everything)

Congratulations! You successfully setup @neynar/nodejs-sdk and used it to look up a user by their FID!

Please do not use @neynar/nodejs-sdk on browser since NEYNAR_API_KEY will be exposed in the bundle.

Ready to start building?

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