> ## Documentation Index
> Fetch the complete documentation index at: https://docs.glot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Invite links

> Let someone join a call without an account or an API key

Sometimes the person you need in a call doesn't have an account with you — a customer, a
patient, a candidate, someone's family member. An invite link brings them in anyway. You
create the link, send it to them however you like, and they join from their browser.

<CardGroup cols={3}>
  <Card title="One room only" icon="door-open">
    A link works for the room you made it for, and nothing else.
  </Card>

  <Card title="Bounded" icon="hourglass-half">
    You choose how long it lasts and how many people it lets in.
  </Card>

  <Card title="Yours to cancel" icon="ban">
    Revoke a room's links at any time and they stop working immediately.
  </Card>
</CardGroup>

## How it works

<Steps>
  <Step title="Create the link">
    Ask Glot for an invite link for a room you have already created.
  </Step>

  <Step title="Send it to your guest">
    Put the code in a link to your own page, and send it however suits you.
  </Step>

  <Step title="Your guest picks their language">
    Your page asks Glot which languages the room can still take, and how many your guest
    picks. It offers them exactly those.
  </Step>

  <Step title="They join">
    Glot hands your page the credentials to connect, and the call begins.
  </Step>
</Steps>

## Creating a link

```bash title="cURL" theme={null}
curl -X POST https://api.staging.glot.com/v1/rooms/$ROOM_ID/invites \
  -H "Authorization: Bearer $GLOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expires_in_seconds": 3600, "max_uses": 1}'
```

```json title="Response" theme={null}
{
  "invite_code": "inv_9f2a…",
  "expires_at": "2026-08-27T15:04:05Z",
  "max_uses": 1
}
```

You choose two things, and both are required:

* **How long it lasts** — up to 30 days. Shorter is safer, and an hour is plenty for a call
  you are about to have.
* **How many people it lets in** — up to 100. Send `1` for a link meant for one guest, so
  that forwarding it cannot let a stranger in behind them.

<Warning>
  The code is shown once, in this response, and cannot be looked up again. Anyone holding it
  can join the room until it expires, runs out of uses, or you revoke it — so treat it like a
  password and send it to your guest directly.
</Warning>

## Building your guest page

The link should point at a page of your own, with the code in the path — for example
`https://yourapp.com/join/inv_9f2a…`. Your page then makes two calls to Glot, neither of
which needs your API key.

### Ask what the room can take

```bash title="cURL" theme={null}
curl https://api.staging.glot.com/v1/invites/$INVITE_CODE
```

```json title="Response" theme={null}
{
  "active_languages": [
    { "code": "zh-CN", "name": "Chinese (China)" },
    { "code": "en-GB", "name": "English (United Kingdom)" }
  ],
  "languages_required": 1,
  "mode": "dual",
  "room_status": "created"
}
```

Two fields drive your chooser. `active_languages` is what to offer — exactly those, and
nothing else. `languages_required` is how many of them your guest picks:

* `1` — your guest joins from their own device. The usual case.
* `2` — the room is set up for a shared device, so one connection carries both speakers.
  Your guest picks both languages of the conversation.
* `null` — the room has no shape yet, and your guest's choice settles it. Ask for one
  language unless you know they are sharing a device.

`mode` names the shape the room is in, and `room_status` is `created` before anyone has
joined, `active` once the call is running. See
[streaming modes](/translation_and_streaming#streaming-modes-mono-and-dual) for what the
two shapes mean.

### Join

```bash title="cURL" theme={null}
curl -X POST https://api.staging.glot.com/v1/invites/$INVITE_CODE/join \
  -H "Content-Type: application/json" \
  -d '{"languages": ["en-GB"]}'
```

```json title="Response" theme={null}
{
  "room": "standup",
  "token": "eyJ…",
  "url": "wss://…",
  "languages": ["en-GB"],
  "identity": "guest-4f9c2a1b8e07"
}
```

Send as many languages as `languages_required` asked for. Your page connects with `token`
and `url`; from there it is an ordinary streaming session — see
[API and streaming](/api_and_streaming).

<Note>
  Read both fields right before showing the chooser rather than reusing an older answer.
  `active_languages` narrows as the call fills up: a room translates between two languages,
  so once both are taken, those are the only two on offer.
</Note>

A stale chooser costs your guest nothing but a retry. A language the room cannot take, or
the wrong number of them, comes back as a `409` and does **not** spend one of the link's
uses.

Keep the code in the path of your URL, not in a query string. Codes in query strings can
leak to other sites your page links to.

## Seeing what is outstanding

To check which links a room has:

```bash title="cURL" theme={null}
curl https://api.staging.glot.com/v1/rooms/$ROOM_ID/invites \
  -H "Authorization: Bearer $GLOT_API_KEY"
```

You get each link's expiry, how many of its uses are gone, and who on your team created it.
Codes are not included — Glot never stores them, so nothing can show them to you again.

A link that has expired or run out of uses still appears here. It no longer works, but it is
still yours to account for.

## Cancelling links

To retire a room's links:

```bash title="cURL" theme={null}
curl -X DELETE https://api.staging.glot.com/v1/rooms/$ROOM_ID/invites \
  -H "Authorization: Bearer $GLOT_API_KEY"
```

They stop working straight away. Anyone already in the call stays in — this cancels the
links, not the connections they granted. To end the call itself, close the room.

<Note>
  This retires **every** link for the room, not one of them. Because you never hold a code
  after you have sent it, cancelling one by name would mean still having the thing you were
  trying to invalidate. If someone should still be able to join, create a fresh link for
  them — links are cheap.
</Note>

Cancelling is safe to repeat. A room with no links to cancel is a success, not an error.

## Good to know

Invite links work for both shapes of call — one where each person joins from their own
device, and one where two people share a phone. Creating a link does not commit the room to
either, and it never changes a shape you have already set. What differs is how many
languages your guest sends when they join, which `languages_required` tells your page.

<Info>
  **Recently changed.** Links can now be created for shared-device rooms, which Glot used to
  refuse. The join request also takes `languages` as an array — `{"languages": ["en-GB"]}` —
  where it previously took a single `language` string. Update your guest page if it still
  sends the old shape.
</Info>

<CardGroup cols={2}>
  <Card title="Stream your first session" icon="rocket" href="/translation_and_streaming">
    The whole flow end to end — rooms, tokens, audio, and rendering the transcript.
  </Card>

  <Card title="Browse the API" icon="terminal" href="/api-reference/invites/create-an-invite-link">
    Every invite endpoint, with its parameters and responses.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.