What are Live Widget’s HTTP responses, and how do you react to them?
- HTTP 404 – you receive this response if you try to call the Disir API with a match ID that does not exist in the system or which you don't have enabled within your subscribed products.
- HTTP 403 – you receive this response if:
- You try to load the Widget URL directly (not within the iFrame
src), and/or - The domain where you try to load the Widgets is not allowed/whitelisted.
- HTTP 200 – you should receive this response if you load the Widget URL within the iFrame
srcfrom a whitelisted/allowed domain for any match enabled in our system (supported by Widgets or no). If/while the Live Widget is not available, it will display "Live stats not available". Then you subscribe to the iFrame DATA event, and if the Live Widget is going to be displayed, you will receive{"type": "DATA", "available": true}at the match start. You should also subscribe to the HEIGHT event to get the updated height of the Live Widget when the data is changing within it; until the Live Widget is active, you can hide it with CSS, likeheight=0ordisplay: none.