Every request to the NZOChain API must include a valid API key. Authentication uses the standard HTTP bearer token scheme — you pass your key in theDocumentation Index
Fetch the complete documentation index at: https://docs.nzochain.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header of each request. There are no cookies, sessions, or OAuth flows to set up.
Getting your API key
- Log in to the NZOChain dashboard.
- Go to Settings → API Keys.
- Click Generate new key and copy the value immediately — it is only shown once.
Passing your API key
Include your key as a bearer token in theAuthorization header on every request:
Code examples
Authentication errors
| HTTP status | Cause | Resolution |
|---|---|---|
401 Unauthorized | API key is missing, malformed, or has been revoked | Check that your Authorization header is present and formatted as Bearer YOUR_API_KEY |
403 Forbidden | Key is valid but your plan does not include this endpoint | Upgrade your plan or check endpoint availability in the API Overview |
Security best practices
- Use environment variables. Store your API key in an environment variable (e.g.,
NZOCHAIN_API_KEY) and read it at runtime. Never hard-code it in your source files. - Keep keys server-side. Never include your API key in client-side JavaScript, mobile app bundles, or any code that is shipped to end users.
- Rotate keys periodically. Regenerate your API key on a regular schedule and immediately after any suspected exposure.
- Use separate keys per environment. Generate distinct keys for development, staging, and production so you can revoke one without affecting the others.