Get nonce

Authentication · Reads onchain state

Issues a one-time nonce to embed in a Sign-In with Ethereum message. The nonce binds the message the wallet is about to sign to this single authentication attempt, which is what makes a replayed signature worthless. It is step one of three: nonce, verify, refresh. Reach for it at the start of wallet authentication, put the value in the SIWE message, and send the signed result to the verify surface.

Send a request

Response

{
data: {
nonce: string
expires_at: string
}
}

Code samples

Language

Claude

Prompt

Call the Plug API endpoint "Get nonce".
## Endpoint
GET /auth/nonce
Base URL: https://api.plug.to
## Description
Issues a one-time nonce to embed in a Sign-In with Ethereum message.
The nonce binds the message the wallet is about to sign to this single authentication attempt, which is what makes a replayed signature worthless. It is step one of three: nonce, verify, refresh.
Reach for it at the start of wallet authentication, put the value in the SIWE message, and send the signed result to the verify surface.
## Response Schema
- data (object, required)
- nonce (string, required) — One-time value to embed in the SIWE message before signing.
- expires_at (string, required) — RFC 3339 timestamp after which the nonce is rejected.
## Example Request
GET https://api.plug.to/auth/nonce