0 reply
0 recast
0 reaction
1 reply
0 recast
4 reactions
1 reply
0 recast
1 reaction

I don't think there's an API to get user info directly from a user address, other than using /neynar (which does basically what I will explain below)
So free what you can do you have two options:
Get the fid of the user(step needed for both options)
- You can get that from the address using optimism RPC, here is an example from my wallet source code: https://github.com/andrei0x309/clear-wallet/blob/main/src/utils/farcaster.ts#L177
After having the FID:
1 Use a Warpcast API endpoint: https://api.warpcast.com/v2/user?fid=1791 (replace the fid)
2 Use a public hub, hubs can get a user by FID, but hubs will be deprecated soon, and on Snapchat, there is no news about free nodes to use. For hubs, there were a few like Pinata.
We must wait to see, if some free resources will be provided, I mean basic free usage should be provided if you pretend you're a protocol because you can get some free data even from web3 products like Twitter, Threads, and Bluesky, so technically more free access should exist on FC. 2 replies
0 recast
1 reaction
1 reply
0 recast
0 reaction
From a mini app you have the context data, which has the basic user info.
so is in mini-app:
```
const pageIsReady = async (sdk: FrameSdk) => {
const context = await sdk.context;
sdk.actions.ready();
return context;
};
```
Info that the client sends looks like this:
```
frameHostRef.current = {
context: {
location: {
type: "launcher",
},
client: {
added: isInstalled,
clientFid: 1791,
notificationDetails: {
token: "",
url: "",
}
},
user: {
fid: mainUserData?.fid || 0,
displayName: mainUserData?.displayName || "",
pfpUrl: mainUserData?.avatar || "",
username: mainUserData?.username || "",
location: {
description: "Anonymous",
placeId: "Unknown",
}
}
},
```
But depends on the client that implenets the host, a client can send what it wants. 1 reply
0 recast
1 reaction
0 reply
0 recast
1 reaction