---
title: "Exchange a signed challenge for a session token"
method: POST
path: "/v1/shadow/history/{wallet}/session"
tags: ["shadow"]
---

# Exchange a signed challenge for a session token

`POST /v1/shadow/history/{wallet}/session`

## Request

- Base URL: `https://swap-backend.stage.defi.ovh.gala.com`
- URL: `https://swap-backend.stage.defi.ovh.gala.com/v1/shadow/history/{wallet}/session`
- Auth: none declared
- TypeScript: <https://skmtc.dev/gala/apis/gala-defi-backend-api/docs/v1/shadow/history/:wallet/session/post.ts> (a function with typed inputs; its response is checked against the schema)

Verifies the EIP-191 signature against the issued challenge and returns a wallet-bound bearer token.

## Path parameters

- `wallet` string, required

## Request body

- ShadowSessionRequestDto
  - `signature` string, required: personal_sign signature of the challenge message returned by /challenge

## Response `200`

- ShadowSessionResponseDto
  - `status` 'success', required
  - `data` ShadowSessionTokenResponseDto, required
    - `token` string, required
    - `tokenType` 'Bearer', required
    - `expiresAt` string, date-time, required

## Other responses

- `400`
- `401`
- `default`: An error response using the shared backend error envelope.

---

[API](https://skmtc.dev/gala/apis/gala-defi-backend-api.md) - [All operations](https://skmtc.dev/gala/apis/gala-defi-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gala/apis/gala-defi-backend-api/revisions/84f8184e2828?raw)
