---
title: "Create Viewer Session"
method: POST
path: "/v2/public/viewer-session"
tags: ["v2 - SDK"]
---

# Create Viewer Session

`POST /v2/public/viewer-session`

## Request

- Base URL: `https://api.jubjubapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jubjubapp.com/v2/public/viewer-session`
- Auth: HTTP bearer

Create a lightweight session token for an SDK viewer.

Public endpoint — no auth required. Creates or finds a viewer
profile, returns a jj_ session token usable for streaming API calls.

Rate-limited per wallet AND per IP: unauthenticated, and each call can
provision a profile. The wallet here is attacker-controlled input, so the
IP bucket is the one that actually bounds provisioning.

## Request body

- ViewerSessionRequest
  - `content_id` string, required
  - `wallet_address` string, required
  - `signature` string, nullable: personal_sign of the SIWE message from GET /v2/auth/wallet-nonce
  - `nonce` string, nullable: Nonce issued by GET /v2/auth/wallet-nonce
  - `siwe_message` string, nullable: SIWE message written by the wallet (wallet_connect signInWithEthereum)
  - `device_public_key` object, nullable: P-256 public JWK {kty, crv, x, y} for a remembered sign-in

## Response `200`

Successful Response

- ViewerSessionResponse
  - `session_token` string, required
  - `profile_id` string, required
  - `wallet_address` string, required
  - `remembered_session_id` string, nullable
  - `remembered_until` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jubjubapp/apis/jubjub-api.md) - [All operations](https://skmtc.dev/jubjubapp/apis/jubjub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jubjubapp/apis/jubjub-api/revisions/353157b296f2?raw)
