---
title: "Get a stream ticket"
method: POST
path: "/stream/tickets"
tags: ["Stream"]
---

# Get a stream ticket

`POST /stream/tickets`

## Request

- Base URL: `https://gorest.co.in/public/v3`
- URL: `https://gorest.co.in/public/v3/stream/tickets`
- Auth: HTTP bearer

A ticket for one `GET /stream/changes?ticket=<ticket>`, for a browser `EventSource`, which cannot send the token in a header. It works once, within 60 seconds, and only on the stream; the stream then checks the token that made it, as for a Bearer call. Never put your API token in a URL; a ticket is made to go there.

## Response `201`

The ticket. It is shown once and never stored in plain form.

- StreamTicket
  - `expires_at` string, date-time, required: The ticket does not work after this, 60 seconds from now.
  - `ticket` string, required: For `?ticket=` on `GET /stream/changes`, once.

## Other responses

- `401`: No token, or the token is wrong, expired or revoked.
- `403`: The token lacks the scope this operation needs.
- `429`: Over the rate limit; wait `Retry-After` seconds.
- `500`: Something failed on the server.

---

[API](https://skmtc.dev/gorest/apis/gorest-api-v3.md) - [All operations](https://skmtc.dev/gorest/apis/gorest-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/gorest/apis/gorest-api-v3/revisions/89aa429755a6?raw)
