---
title: "Challenge"
method: GET
path: "/v1/spl/challenge"
---

# Challenge

`GET /v1/spl/challenge`

Returns a challenge string that the wallet must sign. The signature is then submitted to `/v1/spl/login` in exchange for a bearer token used to read private data.

## Query parameters

- `pubkey` string, required
- `cluster` union
  - 'mainnet' | 'devnet'
  - string
- `mock` boolean

## Response `200`

Challenge string

- object
  - `challenge` string, required — The challenge string generated by the Private Ephemeral Rollup.

## Other responses

- `422` — Validation error
- `500` — Internal server error

---

[API](https://skmtc.dev/magicblock/apis/magicblock-router-api.md) · [All operations](https://skmtc.dev/magicblock/apis/magicblock-router-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/magicblock/magicblock-router-api/revisions/f024efa907c6/schema)
