Read an authorized realtime session and its actual ledger state
GET
/t1/realtime/sessions/{id}
const url = 'https://api.tansr.com/t1/realtime/sessions/example';const options = {method: 'GET', headers: {'x-tansr-app-token': '<x-tansr-app-token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tansr.com/t1/realtime/sessions/example \ --header 'x-tansr-app-token: <x-tansr-app-token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “Responses”Scoped session without credentials or connection ticket
Media typeapplication/json
object
protocol
required
sessionId
required
string
taskId
required
string
model
required
string
status
required
string
phase
required
string
createdAt
required
string
updatedAt
required
string
errorCode
string
billing
required
object
state
required
cost
required
string | null
Example
{ "protocol": "nonchat-operations-v1", "billing": { "state": "settled" }}本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。