{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Issue a short-lived, single-use ticket for opening the realtime socket (ADR 0034 §3).\n\nA browser cannot set headers on a WebSocket, and a cookie is the wrong instrument across origins — so the ticket goes in the socket URL, which is why it must be worth little: it authenticates one upgrade, once, within seconds. The socket is the appview's primary surface (ADR 0011), so this is not an afterthought but the only authenticated path for most of what a client does.",
"output": {
"encoding": "application/json",
"schema": {
"ref": "#output",
"type": "ref"
}
},
"type": "procedure"
},
"output": {
"properties": {
"expiresAt": {
"format": "datetime",
"type": "string"
},
"socket": {
"description": "The URL to open, ticket already appended. Handed over whole so a client is never assembling an authenticated URL itself.",
"format": "uri",
"type": "string"
},
"ticket": {
"type": "string"
}
},
"required": [
"ticket",
"expiresAt",
"socket"
],
"type": "object"
}
},
"id": "chat.yakka.getRealtimeTicket",
"lexicon": 1
}