---
title: "Get Stream Portal Access"
method: POST
path: "/api/v1/auth/stream-portal-access/{stream_id}"
tags: ["Stream Authentication"]
---

# Get Stream Portal Access

`POST /api/v1/auth/stream-portal-access/{stream_id}`

Use this function to get magic links (and authentication codes) for connecting your users to the Stream Consumer Portal.

## Path parameters

- `stream_id` string, required — The Stream's ID or UID.

## Headers

- `idempotency-key` string

## Request body

- StreamPortalAccessIn
  - `expiry` integer, nullable — How long the token will be valid for, in seconds. Valid values are between 1 hour and 7 days. The default is 7 days.
  - `featureFlags` string[] — The set of feature flags the created token will have access to.
  - `sessionId` string, nullable — An optional session ID to attach to the token. When expiring tokens with "Expire All", you can include the session ID to only expire tokens that were created with that session ID.

## Response `200`

- AppPortalAccessOut
  - `token` string, required
  - `url` string, uri, required

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `422` — Validation Error
- `429` — Too Many Requests

---

[API](https://skmtc.net/svix/apis/svix-api.md) · [All operations](https://skmtc.net/svix/apis/svix-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/svix/svix-api/revisions/b0c8a1820333/schema)
