Summary
The generated openrpc.json spec (which powers the https://docs.celestia.org/build/rpc/node-api/) correctly lists the required permission level for each RPC method (e.g. perms: write for blob.Submit), but the example requests do not include the Authorization header. An integrator copying the example request verbatim will get an auth error with no indication of what's missing.
How to Reproduce
- Go to https://docs.celestia.org/build/rpc/node-api/ and look at
blob.Submit
- Note that the method page does say
perms: write — so the permission level is documented
- Look at the example request:
{
"id": 1,
"jsonrpc": "2.0",
"method": "blob.Submit",
"params": [
[
{
"namespace": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAMJ/xGlNMdE=",
"data": "z8QyNztv...",
"share_version": 0,
"commitment": "aHlbp+J9yub6hw/uhK6dP8hBLR2mFy78XNRRdLf2794=",
"index": -1
}
],
{
"gas_price": 0.002,
"is_gas_price_set": true,
"max_gas_price": 0.4,
"gas": 142225,
"tx_priority": 1,
"key_name": "my_celes_key",
"signer_address": "celestia1pjcmwj8w6hyr2c4wehakc5g8cfs36aysgucx66",
"fee_granter_address": "celestia1hakc56ax66ypjcmwj8w6hyr2c4g8cfs3wesguc"
}
]
}
- Note there is no
Authorization: Bearer <token> header shown anywhere in the example
- Copy-paste this example into a
curl call — it fails with an auth error
Expected Behavior
Every example request for a method that requires authentication should include the auth header. For example, the blob.Submit example should show something like:
Authorization: Bearer <token>
alongside the JSON-RPC body, or include a curl example like:
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $CELESTIA_NODE_AUTH_TOKEN" \
-d '{ "id": 1, "jsonrpc": "2.0", "method": "blob.Submit", "params": [...] }' \
http://localhost:26658
The examples should be copy-paste-able and actually work.
Impact
This came up while onboarding an integration partner. They saw the permission level listed on the method, but followed the example request as-is — which doesn't include auth — and hit errors at runtime. The gap between "we tell you auth is required" and "we show you an example without auth" is confusing and slows down integrators.
For someone building against the spec, the examples are the first thing they reach for. If the example doesn't work out of the box, it undermines trust in the docs.
Suggested Fix
Update the spec generation (or the docs site rendering) to:
- Include an
Authorization: Bearer <token> header in every example request for methods with a perm tag
- Use a placeholder like
$CELESTIA_NODE_AUTH_TOKEN or <your-auth-token> to make it clear a token is needed
- Optionally add a brief note next to each example linking to how to generate a token at the appropriate permission level (
celestia <node-type> auth <perm-level>)
Additional Context
Labels
bug, documentation, api
Summary
The generated
openrpc.jsonspec (which powers the https://docs.celestia.org/build/rpc/node-api/) correctly lists the required permission level for each RPC method (e.g.perms: writeforblob.Submit), but the example requests do not include theAuthorizationheader. An integrator copying the example request verbatim will get an auth error with no indication of what's missing.How to Reproduce
blob.Submitperms: write— so the permission level is documented{ "id": 1, "jsonrpc": "2.0", "method": "blob.Submit", "params": [ [ { "namespace": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAMJ/xGlNMdE=", "data": "z8QyNztv...", "share_version": 0, "commitment": "aHlbp+J9yub6hw/uhK6dP8hBLR2mFy78XNRRdLf2794=", "index": -1 } ], { "gas_price": 0.002, "is_gas_price_set": true, "max_gas_price": 0.4, "gas": 142225, "tx_priority": 1, "key_name": "my_celes_key", "signer_address": "celestia1pjcmwj8w6hyr2c4wehakc5g8cfs36aysgucx66", "fee_granter_address": "celestia1hakc56ax66ypjcmwj8w6hyr2c4g8cfs3wesguc" } ] }Authorization: Bearer <token>header shown anywhere in the examplecurlcall — it fails with an auth errorExpected Behavior
Every example request for a method that requires authentication should include the auth header. For example, the
blob.Submitexample should show something like:alongside the JSON-RPC body, or include a curl example like:
The examples should be copy-paste-able and actually work.
Impact
This came up while onboarding an integration partner. They saw the permission level listed on the method, but followed the example request as-is — which doesn't include auth — and hit errors at runtime. The gap between "we tell you auth is required" and "we show you an example without auth" is confusing and slows down integrators.
For someone building against the spec, the examples are the first thing they reach for. If the example doesn't work out of the box, it undermines trust in the docs.
Suggested Fix
Update the spec generation (or the docs site rendering) to:
Authorization: Bearer <token>header in every example request for methods with apermtag$CELESTIA_NODE_AUTH_TOKENor<your-auth-token>to make it clear a token is neededcelestia <node-type> auth <perm-level>)Additional Context
Labels
bug,documentation,api