Getting Started
This page takes you from a new API key to a working RPC endpoint created through the Platform API.
Prerequisites
- A GetBlock account
curl, or Node.js 18+ / Python 3 for the code examples
Create an API key
- Sign in to the GetBlock dashboard.
- Go to Settings → API Keys.
- Create a key and copy it. Keys start with
gb_.
API keys can only be created in the dashboard, not through the API.
Store the key in an environment variable
The examples in these docs read the key from
GETBLOCK_API_KEY:bash
export GETBLOCK_API_KEY="gb_..."The key acts on your whole account, token deletion included. Keep it out of source code and version control.
Confirm the key works
Call
GET /me. It returns your user id when the key is valid:bash
curl https://public-api.getblock.io/api/v1/me \ -H "Authorization: Bearer $GETBLOCK_API_KEY"json
{ "user_id": "3f6c2a1e-8b4d-4c7a-9e2f-5d1b0a9c8e7f" }A
401means the key is missing, mistyped, or revokedauthorization failed
Next steps
- Rotate a token when it leaks
- Check your plan limits before creating many tokens
- Objects and Conventions: pagination, ownership, and errors