# List challenge

URL: https://docs.hanzo.ai/docs/openapi/validator/get-validator-challenge

> Issues the single-use nonce and the exact message a wallet must sign to claim a validator slot.

`GET /v1/validator/challenge`

> [Validator →](https://docs.hanzo.ai/docs/openapi/validator) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                               |
| ------------- | --------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/validator/challenge` |
| **Method**    | `GET`                                         |
| **Operation** | `get_validator_challenge`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`        |

Issues the single-use nonce and the exact message a wallet must sign
to claim a validator slot.

The nonce is bound to (validated org, slot) and stored server-side, so a
signature obtained for one org or one slot can never be replayed for another,
and the message POST /v1/validator verifies is rebuilt from those same server
facts rather than trusted from the caller. Redeem it with
POST /v1/validator before it expires; it can be redeemed once.

A tokenId outside the Validator tier is refused here rather than after signing.

## Request

1 field.

| Field     | In    | Type   | Required | Description                                                                                      |
| --------- | ----- | ------ | -------- | ------------------------------------------------------------------------------------------------ |
| `tokenId` | query | string | —        | TokenID is the Validator-tier GenesisNFT token id, as a decimal string in the `?tokenId=` query. |

## Response

| Status    | Body                    | Meaning |
| --------- | ----------------------- | ------- |
| `200`     | validator.challengeView | ok      |
| `default` | problem-details         | refused |

`200` body — 5 fields.

| Field        | In   | Type             | Always | Description                                                                         |
| ------------ | ---- | ---------------- | ------ | ----------------------------------------------------------------------------------- |
| `expiresAt`  | body | integer (int64)  | —      | ExpiresAt is when the nonce stops being redeemable, as a Unix timestamp.            |
| `message`    | body | string           | —      | Message is the EXACT text to personal\_sign.                                        |
| `nonce`      | body | string           | —      | Nonce is the single-use, org-bound challenge value to send back with the signature. |
| `tokenId`    | body | integer (uint64) | —      | TokenID is the slot the challenge was issued for.                                   |
| `ttlSeconds` | body | integer (int64)  | —      | TTLSeconds is the challenge lifetime in seconds.                                    |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo validator challenge
```

**SDK**

**.ts**

```ts
import { Configuration, ValidatorApi } from 'hanzoai';

const api = new ValidatorApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getValidatorChallenge();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ValidatorApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ValidatorApi(client).get_validator_challenge()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ValidatorAPI.GetValidatorChallenge(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, validator_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = validator_api::get_validator_challenge(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ValidatorApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ValidatorApi(client).getValidatorChallenge();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/validator/challenge \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `validator`, op `get_validator_challenge` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "validator",
         "arguments": {
           "op": "get_validator_challenge",
           "input": {}
         }
       }
     }'
```

---

[Validator API](https://docs.hanzo.ai/docs/openapi/validator) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
