Skip to content
Docs

Authentication

Project ID and secret key

Cloud routes authenticate with a project ID and a server-side secret key.

Overview

Every Cloud API call to https://blockchain.gray3.io authenticates a project, not a human session. You send two values that always belong together:

  • Project ID — prefix proj_. Identifies which app is calling. Create it in Console › API keys.
  • Secret key — prefix gray_sk_. Proves the caller is your backend. Shown once at creation or rotation; treat it like a database password.

They are a pair

The secret is scoped to one project. Sending a valid secret with the wrong project ID (or an inactive project) fails with unauthorized. Rotating the secret keeps the same project ID.

bash
export GRAY_BASE=https://blockchain.gray3.io
export GRAY_PROJECT_ID=proj_…
export GRAY_SECRET_KEY=gray_sk_…

Exception: health

GET /health requires no credentials. Use it for load balancers only—not for chain data.

Next: Required headers.