Mint a stream token
curl --request POST \
--url https://api.usenexio.com/events/stream-tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"topics": [
"<string>"
],
"session": "<string>"
}
'import requests
url = "https://api.usenexio.com/events/stream-tokens"
payload = {
"topics": ["<string>"],
"session": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({topics: ['<string>'], session: '<string>'})
};
fetch('https://api.usenexio.com/events/stream-tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"expires_at": "2023-11-07T05:31:56Z",
"stream_url": "<string>",
"token": "<string>",
"topics": [
"<string>"
]
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Events
Mint a stream token
A 10-minute, read-only token for GET /events/stream, for this org and the acting principal (Nexio-Act-As; in View as, the target, with the operator checked again on every connect). The org topic needs an active seat: a pending or refused seat answers 403 seat_required. Run and record topics need no seat; the app checks ownership finer than the org before it mints. Server to server: browsers never call it.
POST
/
events
/
stream-tokens
Mint a stream token
curl --request POST \
--url https://api.usenexio.com/events/stream-tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"topics": [
"<string>"
],
"session": "<string>"
}
'import requests
url = "https://api.usenexio.com/events/stream-tokens"
payload = {
"topics": ["<string>"],
"session": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({topics: ['<string>'], session: '<string>'})
};
fetch('https://api.usenexio.com/events/stream-tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"expires_at": "2023-11-07T05:31:56Z",
"stream_url": "<string>",
"token": "<string>",
"topics": [
"<string>"
]
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Headers
The caller's remaining budget for this request, in whole milliseconds (1 to 10 digits, greater than zero), relative to receipt. The engine stops work at the shorter of this and the route's own budget, and answers 504 request_timeout when it expires. A value above the route budget is capped to it; a malformed value is ignored.
Body
application/json
Response
OK