Quickstart
Four steps from nothing to your first read: check the API is up, create an API key, exchange it for an access token, and read a profile. Each step shows the call with curl; the whole flow in C#, JavaScript and Python is at the end.
Call the API from your server, never from a web page or an app. It allows no cross-origin requests, so a browser can't call it, and the secret that comes with your key must stay private. The JavaScript on this page is for Node.js or another server runtime.
Stay within the limits
Two limits are worth knowing before you experiment, so a few test runs don't lock you out for a while:
- Tokens: 3 requests per 5 minutes for each account. Get a token once and reuse it until it expires; don't ask for a new one on every call.
- Reads: every read made with a valid token counts against the read budget of your key's account. Without a subscription, or at level 0, that's 25 reads per 15 minutes, shared by all your calls. Higher subscription levels get more. A Site's key goes by the Site's own subscription, so a Site that doesn't subscribe gets the level 0 budget, whatever its owner's level.
Go over either and the API answers 429 Too Many Requests with a Retry-After header: wait that many seconds, plus one, before trying again (Errors says why). Rate limits has the budget for each level.
1. Check the API is up
/v2/meta needs no key or token and isn't rate-limited, so it's a safe first call:
curl https://api.blazot.com/v2/meta{
"name": "Blazot API",
"version": "2.0",
"status": "ok"
}2. Create an API key
- Log in to Blazot and open your Configuration page. For a Site you manage, open the Site's configuration page instead (
https://blazot.com/site/{SiteName}/configuration): its key reads as the Site. - In API Keys, choose Generate API Keys. You get an API Key and a Secret Auth Key.
- Keep both on your server, in a secret store or environment variables, never in source code. The samples below read them from
BLAZOT_API_KEYandBLAZOT_API_SECRET.
3. Get an access token
Send the key and secret to /v2/auth/token. This is the only call that takes them:
curl https://api.blazot.com/v2/auth/token \
--header "x-api-key: $BLAZOT_API_KEY" \
--header "x-secret-auth-key: $BLAZOT_API_SECRET"{
"tokenType": "bearer",
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6...",
"expiresIn": 30000
}Put the accessToken in BLAZOT_TOKEN for the next step. Keep it and reuse it for expiresIn seconds. Authentication covers what to do when it expires or stops working.
4. Read a profile
Send the token as a bearer token. Replace exampleuser with any username, your own for a start:
curl https://api.blazot.com/v2/users/exampleuser \
--header "Authorization: Bearer $BLAZOT_TOKEN"{
"userName": "exampleuser",
"url": "https://blazot.com/exampleuser",
"displayName": "Example User",
"bio": "",
"profileImageUrl": "https://cdn-img.blazot.com/sitecontainer/7c9e6679-7425-40de-944b-e07fc1f90ae7.jpg",
"coverImageUrl": "",
"verified": false,
"isSubscriber": true,
"subscriptionLevel": 1,
"dateJoined": "2026-03-30T17:42:08Z"
}Every other read works the same way: a GET with the bearer token. They're all in the API reference, each with samples you can copy.
The whole flow in code
Each sample gets a token, reads a profile and prints it. A real app keeps the token and reuses it until it expires.
C#
using System.Net.Http.Headers;
using System.Net.Http.Json;
var apiKey = Environment.GetEnvironmentVariable("BLAZOT_API_KEY")!;
var apiSecret = Environment.GetEnvironmentVariable("BLAZOT_API_SECRET")!;
using var http = new HttpClient { BaseAddress = new Uri("https://api.blazot.com") };
// Get a token. Keep it and reuse it until it expires.
using var tokenRequest = new HttpRequestMessage(HttpMethod.Get, "/v2/auth/token");
tokenRequest.Headers.Add("x-api-key", apiKey);
tokenRequest.Headers.Add("x-secret-auth-key", apiSecret);
using var tokenResponse = await http.SendAsync(tokenRequest);
tokenResponse.EnsureSuccessStatusCode();
var token = await tokenResponse.Content.ReadFromJsonAsync<Token>();
// Read a profile.
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token!.AccessToken);
var profile = await http.GetFromJsonAsync<UserProfile>("/v2/users/exampleuser");
Console.WriteLine($"{profile!.DisplayName} joined Blazot on {profile.DateJoined:d}");
record Token(string TokenType, string AccessToken, int ExpiresIn);
record UserProfile(string UserName, string Url, string DisplayName, bool Verified, DateTimeOffset DateJoined);
JavaScript
For Node.js 18 or later, which has fetch built in. Save it as quickstart.mjs so await works at the top level.
const apiKey = process.env.BLAZOT_API_KEY;
const apiSecret = process.env.BLAZOT_API_SECRET;
const base = 'https://api.blazot.com';
// Get a token. Keep it and reuse it until it expires.
const tokenResponse = await fetch(`${base}/v2/auth/token`, {
headers: { 'x-api-key': apiKey, 'x-secret-auth-key': apiSecret },
});
if (!tokenResponse.ok) throw new Error(`Token request failed: ${tokenResponse.status}`);
const { accessToken } = await tokenResponse.json();
// Read a profile.
const response = await fetch(`${base}/v2/users/exampleuser`, {
headers: { Authorization: `Bearer ${accessToken}` },
});
if (!response.ok) throw new Error(`Read failed: ${response.status}`);
const profile = await response.json();
console.log(`${profile.displayName} joined Blazot on ${profile.dateJoined}`);
Python
With the Requests library (pip install requests).
import os
import requests
api_key = os.environ["BLAZOT_API_KEY"]
api_secret = os.environ["BLAZOT_API_SECRET"]
base = "https://api.blazot.com"
# Get a token. Keep it and reuse it until it expires.
token_response = requests.get(
f"{base}/v2/auth/token",
headers={"x-api-key": api_key, "x-secret-auth-key": api_secret},
timeout=10,
)
token_response.raise_for_status()
access_token = token_response.json()["accessToken"]
# Read a profile.
response = requests.get(
f"{base}/v2/users/exampleuser",
headers={"Authorization": f"Bearer {access_token}"},
timeout=10,
)
response.raise_for_status()
profile = response.json()
print(f"{profile['displayName']} joined Blazot on {profile['dateJoined']}")