Learn how to use the isProjectUser JSON-RPC method.
curl --request POST \
--url 'https://api.particle.network/server/rpc/#isProjectUser' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 0,
"method": "isProjectUser",
"params": [
"evm_chain",
"0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF"
]
}
'{
"jsonrpc": "2.0",
"id": 0,
"result": true
}isProjectUserisProjectUser returns a Boolean representing whether or not a specified user (their public address assumedly derived from social login) has interacted with or belongs to your project. It takes:
Chain - either solana or evm_chain.
Address - string.
const axios = require("axios");
(async () => {
const response = await axios.post(
"https://api.particle.network/server/rpc",
{
jsonrpc: "2.0",
id: 0,
method: "isProjectUser",
params: ["evm_chain", "0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF"],
},
{
auth: {
username: "Your Project Id",
password: "Your Project Server Key",
},
}
);
console.log(response.data);
})();
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Request to check if a user is part of your project based on an address.
Version of the JSON-RPC protocol, should be 2.0.
"2.0"
The request identifier.
0
API method being called, should be isProjectUser.
"isProjectUser"
Parameters for the API method call, including an indicator determining Solana or EVM and wallet address.
[
"evm_chain",
"0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF"
]
Was this page helpful?
curl --request POST \
--url 'https://api.particle.network/server/rpc/#isProjectUser' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 0,
"method": "isProjectUser",
"params": [
"evm_chain",
"0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF"
]
}
'{
"jsonrpc": "2.0",
"id": 0,
"result": true
}