curl --request GET \
--url https://api.staging.glot.com/v1/invites/{invite_code}import requests
url = "https://api.staging.glot.com/v1/invites/{invite_code}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.staging.glot.com/v1/invites/{invite_code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.staging.glot.com/v1/invites/{invite_code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.glot.com/v1/invites/{invite_code}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.glot.com/v1/invites/{invite_code}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.glot.com/v1/invites/{invite_code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"active_languages": [
{
"code": "<string>",
"name": "<string>"
}
],
"mode": "<string>",
"languages_required": 123,
"room_status": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Preview an invite link
What this invite link lets a guest choose. No account needed.
Call it to render the guest’s language chooser, which needs both of its answers:
active_languages is exactly the set the join will accept, so offer those and nothing
else, and languages_required is how many of them the guest picks — one for a dual
room, two for a mono one, and null for a room whose mode is not settled yet, where
either count is accepted and the guest’s choice fixes it.
active_languages narrows to two once the room holds two languages, and widens again
when someone disconnects — so read it right before showing the chooser rather than
reusing an older response.
Nothing about the organization behind the room is returned.
A code that is unknown, malformed or revoked returns 404 — all alike, so nothing here
confirms whether a link ever existed. So does one whose signature does not check out:
every code we issue is signed, and a code that was mistyped or built by hand is refused
as not ours. Send the code exactly as POST /v1/rooms/{room_id}/invites returned it.
A code that was valid returns 410 once it has expired, once its uses are spent, or once the room has ended; the message says which, because at that point the only decision left is whether to ask for a new link.
curl --request GET \
--url https://api.staging.glot.com/v1/invites/{invite_code}import requests
url = "https://api.staging.glot.com/v1/invites/{invite_code}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.staging.glot.com/v1/invites/{invite_code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.staging.glot.com/v1/invites/{invite_code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.glot.com/v1/invites/{invite_code}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.glot.com/v1/invites/{invite_code}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.glot.com/v1/invites/{invite_code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"active_languages": [
{
"code": "<string>",
"name": "<string>"
}
],
"mode": "<string>",
"languages_required": 123,
"room_status": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Response
Successful Response
What a guest holding an invite link may choose, without signing in.
Everything a language chooser needs and nothing about the organization behind the room. Read it right before showing the chooser: a room's languages change as people join and leave, so a preview fetched minutes earlier can be stale.
An empty active_languages means this link cannot be redeemed right now — there
is no language the join would accept. mode and room_status say why.
Read it with languages_required: together they are the whole chooser — which
languages to offer, and how many the guest must pick.
The languages this room will still accept, alphabetically by name — offer exactly these and nothing else.
The limit is on languages, not on people. A room translates between at most two languages, but any number of guests may join it: a hundred people speaking those two languages are all admitted, and this list does not shrink as they arrive.
So it narrows only as languages are taken up. While the room holds fewer than two, every supported language is offered — a guest may join the one already being spoken, or bring the second. Once two are in use, those two are offered from then on, however many people join; a third language would have no translator. The list widens again on its own once everyone speaking a language has disconnected and freed it.
When languages_required is 2 the guest picks a pair from this list, and the pair has to fit the same two-language limit — so if the room already holds one language, the pair must include it.
An empty list means the link cannot be redeemed right now; mode and room_status say why.
Show child attributes
Show child attributes
How this room's audio reaches the translator: dual when each speaker joins from their own device, mono when one device carries both. A link works in a room of either mode, and minting one neither sets nor changes it.
null means no mode has been settled yet — the first join token for the room decides it, and this guest's may be that token. What it implies for the guest is on languages_required, which is the field to read.
How many of active_languages the guest must send to POST /v1/invites/{invite_code}/join. 1 for a dual room, 2 for a mono room — where one device carries both speakers, so one connection carries both their languages. Sending a different count returns 409 without spending a use.
null when the room has no mode yet: either count is accepted, and whichever the guest sends fixes the room's mode for its lifetime. Offer one language in that case unless you know the guest is sharing a device.
created before anyone has joined, active once the call is running. A finished room has no usable link, so this link would already have returned 410 rather than reporting it.