curl --request GET \
--url https://api.staging.glot.com/v1/rooms/{room_id}/invites \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.glot.com/v1/rooms/{room_id}/invites"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.glot.com/v1/rooms/{room_id}/invites', 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/rooms/{room_id}/invites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/rooms/{room_id}/invites"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/rooms/{room_id}/invites")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.glot.com/v1/rooms/{room_id}/invites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"max_uses": 123,
"used_count": 123
}
],
"limit": 123,
"offset": 123,
"next_offset": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}List a room's invite links
One page of the invite links outstanding for this room, newest first.
Covers every link for the room, including ones a teammate minted — created_by names
whoever minted each. Use it to see what has been handed out, how much life is left in
each link, and how many of its uses are gone.
No codes are returned, and there is no id to address a link by. Only a hash of a
code is stored, so nothing here can read one back, and a link is addressed by its code
everywhere else in this API. Revoking one therefore needs the code you were given at
mint time; if you no longer have it, DELETE /v1/rooms/{room_id} ends the room and
with it every link for it.
Spent and expired links are listed rather than hidden — they are still rows you own,
and used_count against max_uses and expires_at say which are past use. Only
revoking removes one, because revoking deletes it.
A room in another organization, or one that never existed, returns an empty page
rather than a 404 — the two are not told apart. Use limit and offset to page.
curl --request GET \
--url https://api.staging.glot.com/v1/rooms/{room_id}/invites \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.glot.com/v1/rooms/{room_id}/invites"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.glot.com/v1/rooms/{room_id}/invites', 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/rooms/{room_id}/invites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/rooms/{room_id}/invites"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/rooms/{room_id}/invites")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.glot.com/v1/rooms/{room_id}/invites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"max_uses": 123,
"used_count": 123
}
],
"limit": 123,
"offset": 123,
"next_offset": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
1 <= x <= 200x >= 0