CmsWager Integration Document
  • Introduction
  • Before Start
  • Sportsbook UI
    • Integration
    • Window Message Events
  • CmsWager Api
    • Summary
    • Authentication
    • API Reference
      • Login/Register User
      • Freebet and Bonus assignment
    • Errors
  • Client API Reference
    • Summary
    • Api Reference
      • Bet placement
      • Cancelling bets
      • Concluding bets
      • Reopening concluded bets
      • Partial Cashout
      • Insurance
  • Frontend Api (optional)
    • Summary
    • Api Reference
      • Components
        • Top Leagues
        • Prematch Active Sports
        • Prematch Sport Menu
        • Last minute
        • Live now (reduced)
      • Matches
        • Tournament Odds
        • Match Odds
  • Appendix
    • Transaction types
    • Bet Status
    • Bet Type
    • Error Codes
Powered by GitBook
On this page
  1. Sportsbook UI

Integration

Sportsbook can be implemented by loading a Javascript file provided by cmswager and including a container div in client webpage.

Example

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">

</head>
  <body>
    <div id="appcontent"></div>
</body>
<script src="https://testsportsbook.cmswager.com/js/sportsbook.js"></script>
<script>
(function() {      
    cmsSportbook.startSportbook("desktop","guest","en-US","clientKey","defaultpage");
})();
</script>
</html>

Important! The container div must have the "id" property setted to "appcontent" mandotory. The CmsWager sportsbook will be generated inside the container div.

The method "startSportbook" accept 4 parameters:

Name
Type
Description

platform

string

Sportsbook content view type. It can be "desktop", "mobile" or "tablet"

token

string

User token obtained from user authentication (see Cmswager api section). Use "guest" for unauthenticated users

culture

string

Display culture language. For available languages please see the specific section.

clientKey

string

Client key provided by CmsWager

defaultpage

string

Starting page. It can be "sport" or "live".

PreviousBefore StartNextWindow Message Events

Last updated 8 months ago