curl --request POST \
--url https://api.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket', 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.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket"
req, _ := http.NewRequest("POST", 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.post("https://api.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Course Assistant Voice Ticket
Issue a short-lived, single-use WebSocket credential for an existing voice-capable assistant session (creator plane only in this wave; the learn-plane exam ticket is Phase 3 / Wave 6).
Browsers cannot set custom headers on new WebSocket(), so a normal
Bearer key cannot authenticate the socket. This ticket is the bridge:
24 random bytes, returned ONCE, stored only as its SHA-256 hash, valid
for expires_in seconds and consumable exactly once. Redeem it as
GET /api/v1/voice?ticket=<value>.
404 if the session does not exist, is not owned by this account, or
does not belong to this course. 400 voice_language_unavailable if the
session’s language is not (yet) voice-capable
(see enabled_languages in the error body); the text assistant is
unaffected, only the voice modality is refused.
curl --request POST \
--url https://api.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket', 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.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket"
req, _ := http.NewRequest("POST", 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.post("https://api.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.myustadia.com/api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"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.
Response
Successful Response
The response is of type Response Course Assistant Voice Ticket Api V1 Courses Course Id Assistant Session Id Voice Ticket Post · object.