---
title: "Initialize agent authentication"
method: POST
path: "/agent/v2/auth/init"
tags: ["Agent"]
---

# Initialize agent authentication

`POST /agent/v2/auth/init`

Generate a signable challenge message and nonce for wallet-signature based agent authentication.

## Request body

- AgentAuthInitRequest
  - `address` string, required — Solana wallet public key (base58) that will sign the authentication challenge

## Response `200`

Successfully generated wallet challenge

- object
  - `success` boolean, required
  - `response` object
    - `message` string, required — Base58-encoded challenge message. Decode to raw bytes before signing with Ed25519.
    - `nonce` string, required — Single-use authentication nonce tied to the challenge message

## Other responses

- `400` — Bad request - Invalid wallet address or request payload
- `429` — Too many requests - Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.net/bags/apis/bags-public-api-v2.md) · [All operations](https://skmtc.net/bags/apis/bags-public-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bags/bags-public-api-v2/versions/4a14b82cd39d/schema)
