Authentication

Authenticate yourself to the Particle Node Service API

Endpoint

Base URL: https://rpc.particle.network

The Solana chain's RPC URL is:

https://rpc.particle.network/solana

All EVM-compatible chains' RPC URL is:

https://rpc.particle.network/evm-chain

Authentication

We assume you already have a Particle Account and access to our Dashboard, where you can create projects and apps.

The Web3 APIs require HTTP Basic Authentication:

Basic Auth KeyBasic Auth Value

Username

Your Project Id

Password

Your Project Client Key / Server Key

chainId

  1. You can add it to the URL as param: chainId=xxx

  2. OR You can add it to the JSON RPC request

{
  "chainId": 1, // set chainId here
  "jsonrpc": "2.0",
  "id": "5a91fd28-88a5-4a13-bfa3-bad1cbc048e9",
  "method": "eth_getBalance",
  "params": ["0xE860aE9379B1902DC08F67F50de7b9CC066AF0FF", "latest"]
}

Code Example

const axios = require('axios');

const chainId = 5; // Goerli Network
const projectId = 'Your Project Id';
const projectServerKey = 'Your Project Client Or Server Key';

(async () => {
    const response = await axios.post(`https://rpc.particle.network/evm-chain?chainId=${chainId}`, {
        method: 'eth_getBalance',
        params: [
            '0xE860aE9379B1902DC08F67F50de7b9CC066AF0FF',
            'latest',
        ],
    }, {
        auth: {
            username: projectId,
            password: projectServerKey,
        },
    });

    console.log(response.data);
})();

Last updated