High-level overview

Farcaster Write APIs enable developers to change protocol-level data like cast, reactions, follows, profile edits and more on behalf of users. Apps can request for a Onchain Signer from a user, which can be used to write on behalf of that user. Neynar manages signers on behalf of developers. This makes it really simple to integrate Farcaster into their product.

Easiest way to start is to clone our repo that lets you create a simple app that has sign in w/ FC and writes: https://github.com/manan19/example-farcaster-app

Keep reading to know more about how writes work

  1. App creates a signer using the Neynar API - POST /v2/farcaster/signer and gets the signer public key. App maps the signer_uuid to their internal user object.
  2. App creates a signature using the app’s fid, deadline and the signer public key (Example gist)
  3. App registers the signed key with the Neynar API - POST /v2/farcaster/signer/signed_key and gets an approval url.
  4. App presents the user with the approval url and begins polling the GET /v2/farcaster/signer API using the signer_uuid.
  5. User opens the link and completes the Onchain Signer Add Request flow in Warpcast mobile app.
  6. App finds the user’s fid in the polling response.
  7. App uses signer_uuid for all Neynar Farcaster Write APIs on behalf of that user.