1Access
| Item | Value |
|---|---|
| Base URL | https://radar.albet365.xyz |
| Authentication | Header Authorization: Bearer <API key> on both /matched-events and /generate-token — server-side only |
| Player domains | The player opens only on the website domains registered for your account (and their sub-domains). The browser must send a Referer (do not use referrerpolicy="no-referrer"); embed it in an <iframe> or open it in a new tab. |
| IP whitelist | API calls only from your registered server IPs. The player link itself opens in the viewer's browser. |
2Matches with a live stream
GET/matched-events
{ "status": "success", "data": [ "sr:match:12345678", "sr:match:12345679", … ] }
Refresh every 30–60 seconds on your server and show a TV icon on the listed matches.
3Create a player link
POST/generate-token
// request
{ "eventId": "sr:match:12345678" }
// response
{ "status": "success",
"data": { "singleUseUrl": "/token/eyJ…", "url": "https://radar.albet365.xyz/token/eyJ…", "expiresIn": 600 } }
Show data.url in an iframe:
<iframe src="https://radar.albet365.xyz/token/eyJ…" allow="autoplay; fullscreen" allowfullscreen
style="width:100%;aspect-ratio:16/9;border:0"></iframe>
Important. The link is single-use and valid for about 10 minutes. Create it only when a viewer opens the stream — never in advance, never shared between viewers.
4Recommended flow
- Backend polls
GET /matched-eventsevery 30 s and caches the list. - Frontend shows a TV icon next to the listed matches (from your own backend).
- Viewer clicks → frontend calls your backend → your backend calls
POST /generate-token. - Your backend returns
data.url; the frontend puts it in the iframe.
// Express (your backend)
app.post('/api/stream-url', async (req, res) => {
const r = await fetch('https://radar.albet365.xyz/generate-token', { method: 'POST',
headers: { Authorization: 'Bearer ' + process.env.API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ eventId: req.body.matchId }) });
const j = await r.json();
if (!r.ok) return res.status(r.status).json({ error: j.message });
res.json({ streamUrl: j.data.url });
});
5Limits
| Endpoint | Limit |
|---|---|
/matched-events | 60 requests / minute |
/generate-token | up to 20 links / minute per account (shared fairly when many partners are live at once) — request a link only when a viewer clicks "watch" |
/token/{token} | single use, 10 minutes, no IP restriction (opens in the viewer's browser) |
6Errors
| HTTP | Meaning |
|---|---|
| 400 | Event ID is required / not in the form sr:match:123 |
| 401 | Token is required |
| 403 | Invalid token, IP not whitelisted, service not enabled · player: token already used |
| 404 | No stream for this match right now · player: token expired or invalid |
| 429 | Too many links per minute |
| 502 / 503 | Temporarily unavailable — retry |
{ "status": "error", "message": "No stream for this event right now" }