โ๏ธProfile Creation
Learn how to use Airstack webhooks to listen to various use cases on profile creation on the Farcaster network.
Listen To All Farcaster Profile Creation
You can use Airstack webhooks to listen to all Farcaster profile creation by using the following configuration:
curl -X 'POST' \
'https://webhooks.airstack.xyz/api/v1/webhooks' \
-H 'accept: application/json' \
-H 'Authorization: <YOUR_AIRSTACK_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"endpoint": "https://webhook.site",
"filter_config": {
"event_type": "profile.created"
}
}'
// Prerequisites: npm install axios
import axios from "axios";
const url = "https://webhooks.airstack.xyz/api/v1/webhooks";
const headers = {
accept: "application/json",
Authorization: "YOUR_AIRSTACK_API_KEY",
"Content-Type": "application/json",
};
const data = {
endpoint: "https://webhook.site", // your endpoint
filter_config: {
event_type: "profile.created", // Listen to all profile creation
},
};
axios
.post(url, data, { headers })
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.error("There was an error!", error);
});
// Prerequisites: npm install axios
const axios = require("axios");
const url = "https://webhooks.airstack.xyz/api/v1/webhooks";
const headers = {
accept: "application/json",
Authorization: "YOUR_AIRSTACK_API_KEY",
"Content-Type": "application/json",
};
const data = {
endpoint: "https://webhook.site", // your endpoint
filter_config: {
event_type: "profile.created", // Listen to all profile creation
},
};
axios
.post(url, data, { headers })
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.error("There was an error!", error);
});
{
"id": "b9f62fdc493d1e0033b79dee9102fbe9f72e820e8acece4b6b9d21b2a4240b31",
"eventTimestamp": "2024-05-11T08:43:50.531Z",
"dappName": "farcaster",
"dappSlug": "farcaster_v3_optimism",
"blockchain": "optimism",
"userId": "3761",
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"isDefault": false,
"profileName": "tokenstaker.eth",
"profileTokenId": "3761",
"profileTokenIdHex": "0x0eb1",
"profileTokenAddress": "0x00000000fc6c5f01fc30151999387bb99a9f489b",
"profileCreatedAtBlockNumber": 111894270,
"profileCreatedAtBlockTimestamp": "2023-11-07T20:01:57Z",
"profileTokenUri": "",
"userRecoveryAddress": "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
"profileMetadata": null,
"coverImageURI": "",
"twitterUserName": "",
"location": "",
"website": "",
"profileImageContentValue": {
"image": {
"extraSmall": "https://assets.airstack.xyz/v2/image/social/10/IucLiJGfa/N17Nm7Vg9Ds6fIORR8W0IVmtDidK4ZGqvdcoSEMLGd0hzozjsSu2K3fkKSNwU8TPCOWo90zOmFgf4veZz99NWWdNVh2zzIB8OKt9zk1iNhXY/qBGfpFdZra1uD3yg84WLFLK1gKfQ2nQ==/extra_small.jpg",
"large": "https://assets.airstack.xyz/v2/image/social/10/IucLiJGfa/N17Nm7Vg9Ds6fIORR8W0IVmtDidK4ZGqvdcoSEMLGd0hzozjsSu2K3fkKSNwU8TPCOWo90zOmFgf4veZz99NWWdNVh2zzIB8OKt9zk1iNhXY/qBGfpFdZra1uD3yg84WLFLK1gKfQ2nQ==/large.jpg",
"medium": "https://assets.airstack.xyz/v2/image/social/10/IucLiJGfa/N17Nm7Vg9Ds6fIORR8W0IVmtDidK4ZGqvdcoSEMLGd0hzozjsSu2K3fkKSNwU8TPCOWo90zOmFgf4veZz99NWWdNVh2zzIB8OKt9zk1iNhXY/qBGfpFdZra1uD3yg84WLFLK1gKfQ2nQ==/medium.jpg",
"original": "https://assets.airstack.xyz/v2/image/social/10/IucLiJGfa/N17Nm7Vg9Ds6fIORR8W0IVmtDidK4ZGqvdcoSEMLGd0hzozjsSu2K3fkKSNwU8TPCOWo90zOmFgf4veZz99NWWdNVh2zzIB8OKt9zk1iNhXY/qBGfpFdZra1uD3yg84WLFLK1gKfQ2nQ==/original_image.jpg",
"small": "https://assets.airstack.xyz/v2/image/social/10/IucLiJGfa/N17Nm7Vg9Ds6fIORR8W0IVmtDidK4ZGqvdcoSEMLGd0hzozjsSu2K3fkKSNwU8TPCOWo90zOmFgf4veZz99NWWdNVh2zzIB8OKt9zk1iNhXY/qBGfpFdZra1uD3yg84WLFLK1gKfQ2nQ==/small.jpg"
}
},
"isFarcasterPowerUser": false,
"followingCount": 117,
"followerCount": 108,
"profileBio": "Building Airstack",
"profileDisplayName": "Sarvesh",
"profileImage": "https://i.imgur.com/Y1au7ZB.jpg",
"socialCapital": {
"socialCapitalScore": 0.00151243059,
"socialCapitalScoreRaw": "151243059"
}
}
Developer Support
If you have any questions or need help regarding creating webhook for listening to Farcaster profile creation events, please join our Airstack's Telegram group.
More Resources
Last updated