Skip to main content
This example uses Node.js’s built-in fetch to make the HTTP contract explicit. It does not depend on an SDK release. SDK versions can have different models and authentication options; check the installed version before adapting examples.

Prerequisites

Use an API key, issuer, and available managed signing key from the same environment. Public-key registration alone does not provision a private signing key. Complete workspace setup first.

Mint with Node.js

Save as mint.mjs. Configure the environment variables below through your shell or secret manager, then run node mint.mjs with a Node.js version supporting fetch.
Retain the original body and idempotency key when retrying after a timeout. This short example does not implement persistent jobs or automatic retries. Avoid logging API keys, private payloads, or raw responses containing personal data.

Verify and interpret results

Submit the returned ID to Verify. Add the original payload_b64url if you want to check the exact bytes. Inspect verdict and reasons; HTTP 200 alone does not establish validity. The signature proves a cryptographic relationship to the signing key. It does not independently verify the real-world truth of the submitted claims. For Python’s standard-library version, see the quickstart. For revocation and replacement, follow the generated request contracts for revoke and supersede; do not reuse a mint body for those operations.