Streaming for Partners
This page is for partners who show MangoPlay live tables inside their own product. It is not an operator integration: there are no players and no wallet here, only the video and what is happening at the table.
The full contract, with schemas and copy-ready examples, is published as an OpenAPI specification: Partner Streaming API reference.
What you get
MangoPlay issues you a PartnerCode and a PartnerSecret. Both go in the HTTP
headers on REST calls, and in the handshake on the WebSocket. Keep the secret on your
server — anyone holding it can pull your stream links.
A working integration, in order
-
Call
/roomsand render what comes back. A room with nostreamfield exists but has no video configured yet; a room withisBreak: trueis between dealers and the video keeps flowing. -
Open the WebSocket. On connect you receive events for every room you may see, including rooms added later. Narrow it with
subscribeif you only want some. -
Refresh the links before they expire.
stream.expireis the exact epoch second each link dies (streamTtlSecis 300 today). Call/roomsagain before then and swap the URL in your player. An expired link is rejected by the CDN, not renewed. -
Drive your table UI from the events, not from a poll.
Two things that decide whether your integration behaves
Count down locally, do not wait for the event
partner.round.opened carries bettingEndTime. Close your betting UI from that
timestamp. We also send partner.round.betting_closed when the time arrives — or
earlier, if the dealer closes the round early — but treat it as a convenience. If it
arrives late or not at all after a restart or a network blip, your countdown is still
correct.
Expect the same event twice
A duplicate is possible on our side where a lost event is not, so we chose duplicates.
De-duplicate on roundNo together with event.
When something does not work
Every authentication failure answers the same way — 404 with
{"code": 4040, "message": "Partner not found."} — whether the code is unknown, the
secret is wrong, or the account is suspended. A different answer per case would let
anyone probe which partner codes exist.
Our side logs which one it actually was. If you are stuck, send us the time of the
attempt and your PartnerCode and we can tell you: contact us.