Skip to Content
Authentication

Authentication

All API requests require authentication tied to your assigned endpoint URL. The SDK uses that full endpoint directly, while direct HTTP requests can send the API key in the X-API-Key header.

Getting access

Sign up at spectrumnodes.com to get your assigned endpoint URL and API credentials.

Using your key

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
{
  "jsonrpc": "2.0",
  "method": "getBlockHeight",
  "params": {
    "chain": "ethereum"
  },
  "id": 1
}

SDK

import { Spectrum } from '@spectrum-nodes/sdk'; const spectrum = new Spectrum({ api: 'https://your-endpoint.simplystaking.xyz/YOUR_API_KEY/', });

The SDK sends requests directly to your assigned endpoint URL.

Security best practices

  • Never expose your API key in client-side code. Use a backend proxy or serverless function.
  • Use environment variables to store the full endpoint URL:
export SPECTRUM_API=https://your-endpoint.simplystaking.xyz/YOUR_API_KEY/
const spectrum = new Spectrum({ api: process.env.SPECTRUM_API!, });
  • Rotate keys if you suspect they’ve been compromised. Generate a new key from the dashboard and update your applications.

Unauthenticated endpoints

The health check endpoint does not require authentication:

curl https://your-endpoint.simplystaking.xyz/v1/v1/health