For the complete documentation index, see llms.txt. This page is also available as Markdown.

Getting Started

Create a GetBlock API key, confirm it works, and issue your first access token with the Platform API.

This page takes you from a new API key to a working RPC endpoint created through the Platform API.

Prerequisites

1

Create an API key

  1. Sign in to the GetBlock dashboard.

  2. Create a key and copy it. Keys start with gb_.

API keys can only be created in the dashboard, not through the API.

2

Store the key in an environment variable

The examples in these docs read the key from GETBLOCK_API_KEY:

export GETBLOCK_API_KEY="gb_..."
3

Confirm the key works

Call GET /me. It returns your user id when the key is valid:

curl https://public-api.getblock.io/api/v1/me \
  -H "Authorization: Bearer $GETBLOCK_API_KEY"
{
  "user_id": "3f6c2a1e-8b4d-4c7a-9e2f-5d1b0a9c8e7f"
}

A 401 means the key is missing, mistyped, or revoked

authorization failed

Next steps

Last updated

Was this helpful?