๐ธProfile Update
Learn how to use Airstack webhooks to listen to various use cases on profile updates on the Farcaster network.
Listen To All Profile Updates
You can use Airstack webhooks to listen to all Farcaster profile update events 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.updated"
}
}'
// 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.updated', // Listen to all profile updates
}
};
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.updated', // Listen to all profile updates
}
};
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"
}
}
Listen To All Profile Updates By A Certain FID
You can use Airstack webhooks to listen to all Farcaster profile updates on a certain FID 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.updated",
"filter": {
"userId": "602"
},
"payload": {
"userId": "602",
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"profileName": "betashop.eth",
"userRecoveryAddress": "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
"isFarcasterPowerUser": false,
"followingCount": 117,
"followerCount": 108,
"socialCapital": {
"socialCapitalScore": 0.00151243059,
"socialCapitalRank": 1512
}
}
}
}'
// 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.updated', // Listen to all profile updates
filter: {
userId: "602"
},
payload: {
userId: "602", // userId must match value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: false,
followingCount: 117,
followerCount: 108,
socialCapital: {
socialCapitalScore: 0.00151243059,
socialCapitalRank: 1512
}
}
}
};
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.updated', // Listen to all profile updates
filter: {
userId: "602"
},
payload: {
userId: "602", // userId must match value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: false,
followingCount: 117,
followerCount: 108,
socialCapital: {
socialCapitalScore: 0.00151243059,
socialCapitalRank: 1512
}
}
}
};
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": "602", // Match userId as specified in filter
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"isDefault": false,
"profileName": "betashop.eth",
"profileTokenId": "602",
// ...Other fields
}
Listen To All Profile Updates Of An Array of FIDs
You can use Airstack webhooks to listen to all Farcaster profile updates on an array of FIDs 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.updated",
"filter": {
"userId": {
"$in": ["602", "2602"]
}
},
"payload": {
"userId": "602",
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"profileName": "betashop.eth",
"userRecoveryAddress": "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
"isFarcasterPowerUser": false,
"followingCount": 117,
"followerCount": 108,
"socialCapital": {
"socialCapitalScore": 0.00151243059,
"socialCapitalRank": 1512
}
}
}
}'
// 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.updated', // Listen to all profile updates
filter: {
userId: {
$in: ["602", "2602"]
}
},
payload: {
// userId must have one of the value in $in array as defined
// in filter
userId: "602",
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: false,
followingCount: 117,
followerCount: 108,
socialCapital: {
socialCapitalScore: 0.00151243059,
socialCapitalRank: 1512
}
}
}
};
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.updated', // Listen to all profile updates
filter: {
userId: {
$in: ["602", "2602"]
}
},
payload: {
// userId must have one of the value in $in array as defined
// in filter
userId: "602",
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: false,
followingCount: 117,
followerCount: 108,
socialCapital: {
socialCapitalScore: 0.00151243059,
socialCapitalRank: 1512
}
}
}
};
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": "602", // Match userId as specified in filter
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"isDefault": false,
"profileName": "betashop.eth",
"profileTokenId": "602"
// ...Other fields
}
Listen To A Certain FID When Receiving Farcaster Power Badge
You can use Airstack webhooks to listen to a certain FID when earning a Farcaster power badge by using the following configuration:
To implement the reverse, that is when losing a Farcaster power badge, simply set isFarcasterPowerUser
to false
in filter
.
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.updated",
"filter": {
"$and": [
{
"userId": "602"
},
{
"isFarcasterPowerUser": true
}
]
},
"payload": {
"userId": "602",
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"profileName": "betashop.eth",
"userRecoveryAddress": "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
"isFarcasterPowerUser": true,
"followingCount": 117,
"followerCount": 108,
"socialCapital": {
"socialCapitalScore": 0.00151243059,
"socialCapitalRank": 1512
}
}
}
}'
// 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.updated', // Listen to all profile updates
filter: {
$and: [
{
userId: "602"
},
{
isFarcasterPowerUser: true
}
]
},
payload: {
userId: "602", // userId must match value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
// this must be true as defined in filter
isFarcasterPowerUser: true,
followingCount: 117,
followerCount: 108,
socialCapital: {
socialCapitalScore: 0.00151243059,
socialCapitalRank: 1512
}
}
}
};
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.updated', // Listen to all profile updates
filter: {
$and: [
{
userId: "602"
},
{
isFarcasterPowerUser: true
}
]
},
payload: {
userId: "602", // userId must match value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
// this must be true as defined in filter
isFarcasterPowerUser: true,
followingCount: 117,
followerCount: 108,
socialCapital: {
socialCapitalScore: 0.00151243059,
socialCapitalRank: 1512
}
}
}
};
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": "602", // Match userId as specified in filter
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"isDefault": false,
"profileName": "betashop.eth",
"profileTokenId": "602",
"isFarcasterPowerUser": true
// ...Other fields
}
Listen To A Certain FID When Follower Count > X
You can use Airstack webhooks to listen to a certain FID when follower count is above certain number 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.updated",
"filter": {
"$and": [
{
"userId": "602"
},
{
"followerCount": {
"$gte": 1000
}
}
]
},
"payload": {
"userId": "602",
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"profileName": "betashop.eth",
"userRecoveryAddress": "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
"isFarcasterPowerUser": false,
"followingCount": 117,
"followerCount": 1080,
"socialCapital": {
"socialCapitalScore": 0.00151243059,
"socialCapitalRank": 1512
}
}
}
}'
// 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.updated', // Listen to all profile updates
filter: {
$and: [
{
userId: "602"
},
{
followerCount: {
$gte: 1000
}
}
]
},
payload: {
userId: "602", // userId must match to value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: true,
followingCount: 117,
followerCount: 1080, // follower count must be >= 1000
socialCapital: {
socialCapitalScore: 0.00151243059,
socialCapitalRank: 1512
}
}
}
};
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.updated', // Listen to all profile updates
filter: {
$and: [
{
userId: "602"
},
{
followerCount: {
$gte: 1000
}
}
]
},
payload: {
userId: "602", // userId must match to value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: true,
followingCount: 117,
followerCount: 1080, // follower count must be >= 1000
socialCapital: {
socialCapitalScore: 0.00151243059,
socialCapitalRank: 1512
}
}
}
};
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": "602", // Match userId as specified in filter
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"isDefault": false,
"profileName": "betashop.eth",
"profileTokenId": "602",
"followerCount": 2000
// ...Other fields
}
Listen To A Certain FID When Following Count > X
You can use Airstack webhooks to listen to a certain FID when following count is above certain number 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.updated",
"filter": {
"$and": [
{
"userId": "602"
},
{
"followingCount": {
"$gte": 1000
}
}
]
},
"payload": {
"userId": "602",
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"profileName": "betashop.eth",
"userRecoveryAddress": "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
"isFarcasterPowerUser": false,
"followingCount": 1170,
"followerCount": 1080,
"socialCapital": {
"socialCapitalScore": 0.00151243059,
"socialCapitalRank": 1512
}
}
}
}'
// 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.updated', // Listen to all profile updates
filter: {
$and: [
{
userId: "602"
},
{
followingCount: {
$gte: 1000
}
}
]
},
payload: {
userId: "602", // userId must match to value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: true,
followingCount: 1170, // following count must be >= 1000
followerCount: 1080,
socialCapital: {
socialCapitalScore: 0.00151243059,
socialCapitalRank: 1512
}
}
}
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('There was an error!', error);
});
// 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.updated', // Listen to all profile updates
filter: {
$and: [
{
userId: "602"
},
{
followingCount: {
$gte: 1000
}
}
]
},
payload: {
userId: "602", // userId must match to value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: true,
followingCount: 1170, // following count must be >= 1000
followerCount: 1080,
socialCapital: {
socialCapitalScore: 0.00151243059,
socialCapitalRank: 1512
}
}
}
};
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": "602", // Match userId as specified in filter
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"isDefault": false,
"profileName": "betashop.eth",
"profileTokenId": "602",
"followingCount": 2000
// ...Other fields
}
Listen To A Certain FID When Social Capital Score > X
You can use Airstack webhooks to listen to a certain FID when social capital score is above certain number 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.updated",
"filter": {
"$and": [
{
"userId": "602"
},
{
"socialCapital": {
"socialCapitalScore": {
"$gte": 100
}
}
}
]
},
"payload": {
"userId": "602",
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"profileName": "betashop.eth",
"userRecoveryAddress": "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
"isFarcasterPowerUser": false,
"followingCount": 1170,
"followerCount": 1080,
"socialCapital": {
"socialCapitalScore": 110,
"socialCapitalRank": 1512
}
}
}
}'
// 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.updated', // Listen to all profile updates
filter: {
$and: [
{
userId: "602"
},
{
socialCapital: {
socialCapitalScore: {
$gte: 100
}
}
}
]
},
payload: {
userId: "602", // userId must match value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: true,
followingCount: 1170,
followerCount: 1080,
socialCapital: {
socialCapitalScore: 110, // social capital score > 100
socialCapitalRank: 1512
}
}
}
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('There was an error!', error);
});
// 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.updated', // Listen to all profile updates
filter: {
$and: [
{
userId: "602"
},
{
socialCapital: {
socialCapitalScore: {
$gte: 100
}
}
}
]
},
payload: {
userId: "602", // userId must match value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: true,
followingCount: 1170,
followerCount: 1080,
socialCapital: {
socialCapitalScore: 110, // social capital score > 100
socialCapitalRank: 1512
}
}
}
};
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": "602", // Match userId as specified in filter
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"isDefault": false,
"profileName": "betashop.eth",
"profileTokenId": "602",
"socialCapital": {
"socialCapitalScore": 150,
"socialCapitalRank": 100
}
// ...Other fields
}
Listen To A Certain FID When Social Capital Rank < X
You can use Airstack webhooks to listen to a certain FID when social capital rank is below certain rank number 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.updated",
"filter": {
"$and": [
{
"userId": "602"
},
{
"socialCapital": {
"socialCapitalRank": {
"$lte": 100
}
}
}
]
},
"payload": {
"userId": "602",
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"profileName": "betashop.eth",
"userRecoveryAddress": "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
"isFarcasterPowerUser": false,
"followingCount": 1170,
"followerCount": 1080,
"socialCapital": {
"socialCapitalScore": 0.00151243059,
"socialCapitalRank": 10
}
}
}
}'
// 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.updated', // Listen to all profile updates
filter: {
$and: [
{
userId: "602"
},
{
socialCapital: {
socialCapitalRank: {
$lte: 100
}
}
}
]
},
payload: {
userId: "602", // userId must match value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: true,
followingCount: 1170,
followerCount: 1080,
socialCapital: {
socialCapitalScore: 110,
// social capital rank must be below 100
socialCapitalRank: 10
}
}
}
};
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.updated', // Listen to all profile updates
filter: {
$and: [
{
userId: "602"
},
{
socialCapital: {
socialCapitalRank: {
$lte: 100
}
}
}
]
},
payload: {
userId: "602", // userId must match value in filter
userAddress: "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
userAssociatedAddresses: [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
profileName: "betashop.eth",
userRecoveryAddress: "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
isFarcasterPowerUser: true,
followingCount: 1170,
followerCount: 1080,
socialCapital: {
socialCapitalScore: 110,
// social capital rank must be below 100
socialCapitalRank: 10
}
}
}
};
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": "602", // Match userId as specified in filter
"userAddress": "0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"userAssociatedAddresses": [
"0xa3a736379bfb4a9748c3e4daf5f9af0edfcc6c1a",
"Cry3MBYMS34p67Tr6pmart85JuTpdULhgDtaV8rxadng",
"0xcbfbcbfca74955b8ab75dec41f7b9ef36f329879"
],
"isDefault": false,
"profileName": "betashop.eth",
"profileTokenId": "602",
"socialCapital": {
"socialCapitalScore": 150,
"socialCapitalRank": 10
}
// ...Other fields
}
Developer Support
If you have any questions or need help regarding creating webhook for listening to Farcaster profile update events, please join our Airstack's Telegram group.
More Resources
Last updated