ExchainDocs
DocsAPI

APIWalletsMint a read token

Mint a read token

Mint a 15-minute read token for one wallet.

POST
/v1/wallets/{walletId}/read-token

Mint a read token for one wallet. It is valid 15 minutes and works on the GET read routes of that wallet and on the embeddable page /protected/{walletId}?t=. Send no body. Read tokens cannot be revoked; they expire.

Authorization

nodeToken
headerAuthorizationBearer <token>

Node Token from the Exchain console. Works for wallets this node registered; the node’s network (preprod or mainnet) decides the network of the request. Use a preprod token in the playground.

Path Parameters

walletId*string

Wallet id returned at registration: wal_ and 26 Crockford base32 characters.

Match^wal_[0-9A-HJKMNP-TV-Z]{26}$

Response Body

Minted.

application/json
  1. response
token*string

Opaque base64url string: wallet id, expiry and an HMAC. Send it as a bearer token.

Length16 <= length
expiresAt*DateTime
Formatdate-time
asOf*string
Match^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
Formatdate-time
schemaVersion*string

Wire schema version, "1.1" today.

Value in"1.0""1.1"
chainTip*|null
Example Request
curl -X POST 'https://cosign.exchain.network/v1/wallets/wal_01J9XK3M4N5P6Q7R8S9T0V1W2Z/read-token'
Example Response
{  "token": "d2FsXzAxSjlYSzNNNE41UDZRN1I4UzlUMFYxVzJaAAAAAGrslJPL4dZ4S7eR6i1xMIX-4z8HD9XK4FwyuA-K7Ln5fJz0lA",  "expiresAt": "2026-11-05T14:37:07Z",  "asOf": "2026-11-05T14:22:07.318Z",  "schemaVersion": "1.1",  "chainTip": {    "slot": 104118120,    "blockHash": "9a301ac2e5747e7ebeeecececd2f114f55695614277514e085211c5417d04c26"  }}

Errors

StatusCodeMeaning
401unauthorizedThe bearer credential is missing, unknown or revoked; or a read token was sent: minting needs the Node Token.
404not_foundThe wallet does not exist or this node did not register it.
413payload_too_largeThe request body is larger than 64 KiB.

Every code and what to do about it: Errors and codes.