isProjectUser
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"
]
}
'import requests
url = "https://api.particle.network/server/rpc/#isProjectUser"
payload = {
"jsonrpc": "2.0",
"id": 0,
"method": "isProjectUser",
"params": ["evm_chain", "0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF"]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 0,
method: 'isProjectUser',
params: ['evm_chain', '0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF']
})
};
fetch('https://api.particle.network/server/rpc/#isProjectUser', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.particle.network/server/rpc/#isProjectUser",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 0,
'method' => 'isProjectUser',
'params' => [
'evm_chain',
'0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.particle.network/server/rpc/#isProjectUser"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 0,\n \"method\": \"isProjectUser\",\n \"params\": [\n \"evm_chain\",\n \"0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.particle.network/server/rpc/#isProjectUser")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 0,\n \"method\": \"isProjectUser\",\n \"params\": [\n \"evm_chain\",\n \"0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.particle.network/server/rpc/#isProjectUser")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 0,\n \"method\": \"isProjectUser\",\n \"params\": [\n \"evm_chain\",\n \"0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 0,
"result": true
}Server API
isProjectUser
Learn how to use the isProjectUser JSON-RPC method.
POST
/
#isProjectUser
isProjectUser
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"
]
}
'import requests
url = "https://api.particle.network/server/rpc/#isProjectUser"
payload = {
"jsonrpc": "2.0",
"id": 0,
"method": "isProjectUser",
"params": ["evm_chain", "0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF"]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 0,
method: 'isProjectUser',
params: ['evm_chain', '0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF']
})
};
fetch('https://api.particle.network/server/rpc/#isProjectUser', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.particle.network/server/rpc/#isProjectUser",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 0,
'method' => 'isProjectUser',
'params' => [
'evm_chain',
'0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.particle.network/server/rpc/#isProjectUser"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 0,\n \"method\": \"isProjectUser\",\n \"params\": [\n \"evm_chain\",\n \"0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.particle.network/server/rpc/#isProjectUser")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 0,\n \"method\": \"isProjectUser\",\n \"params\": [\n \"evm_chain\",\n \"0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.particle.network/server/rpc/#isProjectUser")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 0,\n \"method\": \"isProjectUser\",\n \"params\": [\n \"evm_chain\",\n \"0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 0,
"result": true
}Understanding isProjectUser
-
isProjectUserreturns 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- eithersolanaorevm_chain. -
Address- string.
-
Query example
JavaScript
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);
})();
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
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.
Example:
"2.0"
The request identifier.
Example:
0
API method being called, should be isProjectUser.
Example:
"isProjectUser"
Parameters for the API method call, including an indicator determining Solana or EVM and wallet address.
Example:
[
"evm_chain",
"0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF"
]
⌘I
