...
The customer must have a listener to receive the events that the Multibet Widget will send when the player sends his bet in the Add to betslip
action.Given that the iframe from Genius Sports you integrated with has the ID ‘betgenius-iframe’, you need to add the following code to listen to selections being clicked
The following is an example of the structure of these events:
|
<script>
var iframeApi = new IFrameApi("betgenius-iframe");
iframeApi.onMessage = function(message) {
window.MESSAGES.push(message);
switch (message["command"]) {
case "addToBetslip":
console.log(message["selection"]);
break;
}
};
</script>
The selection ID being added is present in the property.
|
With Multibet widget the message contract is extended to include the following elements:
|
...
sportsbookFixtureId
- customer fixture IDmarketId
- Genius Sports market IDsportsbookMarketId
- customer market IDsportsbookMarketContext
- customer market context. This field will be populated only if customer provided it in UpdategramResponsedecimalPrice
- the price that was displayed in the Multibet widget when punter pressed "Add to betslip" button. This value should NOT be used for bet acceptance
...
Customer-Based API Authentication Method
To be able to get a response from Multibet widget, Genius SSM AWS must have configured per customer: client_id
, client_secret
and api-key
to be able to get response from Multibet widget
creation secrets path:
/fep-platform/widgets/multibet/[clientName]
secret structure :
...
{
...
"x_api_key":
...
"[client_x_api_key]",
...
"client_id":
...
"[client_id]",
...
"client_secret":
...
"[client_secret]"
...
}
Multibet Widget Customization
Customer Customers can easily customize the look of the Multibet Widget. More details are available on Widget Customization
...