@neynar/react SDK, see our Wownar React SDK examples.
Before beginning, ensure that your backend has your Neynar API Key securely managed so you have safe access set up to call our API.
Calling the POST frame/action API
This API route takes three inputs:
signer_uuid: the Neynar Signer UUID for the user who is taking the frame action, which would be retrieved through using Sign In with Neynar- required value
cast_hash: the hash of the cast from which the frame action is taking place- optional value, defaults to
0xfe90f9de682273e05b201629ad2338bdcd89b6be
- optional value, defaults to
action: the object of the frame being interacted with, including the interacted with button/action, which can normally be retrieved from the Neynar APIs- required value
Handling client-side interactions
There are a few frame actions that take place fully on the client-side and do not/cannot be sent to thePOST frame/action API. Those actions are:
postandredirect: these actions should be handled on the client either as awindow.replaceor as a link to a new tabmintandtx: the mint/transaction data itself should also be handled on the client, as the data from the frame object should have enough information to use in a package such aswagmiorviem. Here’s an example from our wownar-react-sdk repo.
Conclusion
This guide went over how to handle frame interactions on your backend with the NeynarPOST frame/action API. Make sure to share what you built with us on Farcaster by tagging @neynar, and if you have any questions, reach out to us on Warpcast or Slack!
