---
title: "Generate Wallet Nonce"
method: POST
path: "/api/v1/auth/wallet/nonce/{wallet_address}"
tags: ["Auth - Wallet"]
---

# Generate Wallet Nonce

`POST /api/v1/auth/wallet/nonce/{wallet_address}`

## Request

- The document declares no server URL.
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://auth.mor.org/oauth2/authorize`
    - Token URL: `https://auth.mor.org/oauth2/token` scopes: `aws.cognito.signin.user.admin`, `openid`, `email`, `profile`
  - HTTP bearer

Generate a nonce for wallet signature verification.

The frontend should:
1. Call this endpoint with the wallet address to get a nonce and message template
2. Construct the message by filling in the template with wallet_address, nonce, and timestamp
3. Request the user to sign the message with their Web3 wallet
4. Submit the signature to POST /wallet/link

Nonces expire after 5 minutes and can only be used once.

## Path parameters

- `wallet_address` string, required: Ethereum wallet address to generate nonce for (0x prefixed, 40 hex characters)

## Response `200`

Successful Response

- NonceResponse: Response containing a nonce for wallet signature verification.
  - `nonce` string, required: Cryptographic nonce (64 hex characters)
  - `message_template` string, required: Template for constructing the message to sign. Replace {wallet_address}, {nonce}, and {timestamp} with actual values.
  - `expires_in` integer: Number of seconds until the nonce expires

## Other responses

- `422`: Validation Error

## Changes

- **2026-05-22** `6059f99c1875`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/morpheusais/apis/morpheus-api-gateway/changes/api/v1/auth/wallet/nonce/:wallet_address/post.md)

---

[API](https://skmtc.dev/morpheusais/apis/morpheus-api-gateway.md) - [All operations](https://skmtc.dev/morpheusais/apis/morpheus-api-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/morpheusais/apis/morpheus-api-gateway/revisions/6059f99c1875?raw)
