---
title: "Realtime Access"
method: POST
path: "/internal/realtime-access"
tags: ["internal"]
---

# Realtime Access

`POST /internal/realtime-access`

Resolve a Stytch session token + trip_id into our internal user_id.

Called by Hocuspocus's `onAuthenticate` to gate WebSocket handshakes.
Returns 401 on bad token, 404 on no/insufficient trip access (the latter
delegated to `verify_trip_access` so we share rules with HTTP routes).

## Request body

- RealtimeAccessRequest
  - `token` string, required
  - `trip_id` string, required

## Response `200`

Successful Response

- RealtimeAccessResponse
  - `user_id` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/stardrift/apis/fastapi.md) · [All operations](https://skmtc.dev/stardrift/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/stardrift/fastapi/revisions/00746572572a/schema)
