Vercel Blob
Vercel Blob API requests authenticated with a read-write token. The endpoint, pathname, access level, upload options, and Blob API headers stay with the caller.
Inserts a sensitive Authorization: Bearer header and leaves the URI and every other header unchanged; expires_in is rejected because Vercel Blob has no query authentication.
Get started
cargo add reqsign --features vercel
use reqsign::{default_context, vercel};
// BLOB_READ_WRITE_TOKEN — resolved by the default chain.
let ctx = default_context();
let signer = vercel::default_blob_signer(ctx);
let mut req = http::Request::builder()
.method(http::Method::PUT)
.uri("https://vercel.com/api/blob/reports/2026%20Q1.csv?addRandomSuffix=0")
.body(())?
.into_parts()
.0;
// Sign in place, then send with the HTTP client you already use.
signer.sign(&mut req, None).await?;
The signer inserts Authorization: Bearer <token>, which is how a Vercel Blob
read-write token authenticates Blob API calls.
Credential discovery
The default chain reads BLOB_READ_WRITE_TOKEN through Context environment
access. Vercel documents this variable as the long-lived static read-write token
for code running outside Vercel.
Vercel's OIDC flow (VERCEL_OIDC_TOKEN with BLOB_STORE_ID) and client-token
flows need store or operation context in the request, so they are not part of
the default chain. Pass a caller-managed token through
BlobStaticCredentialProvider when the application already owns one.
A present but unusable BLOB_READ_WRITE_TOKEN, or an invalid prepended or static
provider, fails signing instead of silently selecting a different identity. An
absent token yields no credential, and signing then reports CredentialInvalid.
Endpoint and request fields stay with the caller
The signer preserves the URI. The caller chooses the Blob API endpoint, pathname,
method, access level, upload options, and headers such as x-api-version. Vercel's
current SDK targets https://vercel.com/api/blob for control-plane calls and
serves blob content from *.blob.vercel-storage.com; a custom or emulator
endpoint remains a caller choice.
The token is scoped to a Blob store, but the request pathname and access level select the object or upload behavior. Reqsign does not build those fields.
Request behavior
BlobRequestSigner inserts a sensitive Authorization header and leaves the URI
and every other header unchanged. The Blob API has no query authentication, so
signing rejects expires_in.
A read-write token is long-lived and carries no expiry that Reqsign can read. Signing writes no protocol time, so signing has no clock dependency. Rotate the token with the mechanism your deployment already uses; a revoked token fails at the API.
The caller owns the HTTP client and its redirect policy. Do not forward the
signed Authorization header to a different host.
WASM
Environment and static credentials plus header signing work on
wasm32-unknown-unknown without a JavaScript clock.
Credentials
Default credential chain
The default signer tries these sources in order and uses the first one that yields a credential — no configuration needed when any of them is present:
- BLOB_READ_WRITE_TOKEN
Credential providers
Available ProvideCredential implementations. Construct any of them directly, reorder them, or compose them into your own chain — see Loading credentials:
BlobEnvCredentialProvider— BLOB_READ_WRITE_TOKENBlobStaticCredentialProvider— Static Vercel Blob read-write token