---
title: "Exchange a one-time Composal Pages callback token for a viewer session (dispatch Worker only)"
method: POST
path: "/api/v1/com_site_access/redeem"
tags: ["com_site_access"]
---

# Exchange a one-time Composal Pages callback token for a viewer session (dispatch Worker only)

`POST /api/v1/com_site_access/redeem`

## Request

- Base URL: `https://composal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://composal.com/api/v1/com_site_access/redeem`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

## Request body

- object
  - `host` string, required
  - `token` string, required

## Response `200`

Viewer session token for the site's host-only cookie

- object
  - `session_token` string, required
  - `max_age` integer, required
  - `viewer_id` string, required

## Other responses

- `401`: Missing dispatch bearer, or an invalid, expired or replayed token
- `403`: The signed-in user can no longer view the site

---

[API](https://skmtc.dev/composal/apis/vex-api.md) - [All operations](https://skmtc.dev/composal/apis/vex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/composal/apis/vex-api/revisions/74298a24e040?raw)
