Skip to content

Frontend Integration

Beexar games are embedded in your platform using standard HTML iframes. The launch_url from the launch response is used as the iframe src.

<iframe
src="https://games.beexar.com/dice/your-operator-slug/dice-game?token=..."
style="width: 100%; height: 100%; border: none;"
allow="autoplay"
sandbox="allow-scripts allow-same-origin allow-popups"
title="Beexar Game"
></iframe>
AttributeValuePurpose
srclaunch_url from launchGame URL with session token
allowautoplayEnable game audio/animations
sandboxallow-scripts allow-same-origin allow-popupsSecurity sandboxing
titleGame nameAccessibility

If your site uses a Content Security Policy, you must allow Beexar game domains in your CSP headers:

Content-Security-Policy:
frame-src https://games.beexar.com;
connect-src https://games.beexar.com https://gateway.beexar.com;
DirectiveDomainPurpose
frame-srchttps://games.beexar.comAllow game iframes
connect-srchttps://games.beexar.comAllow game API requests
connect-srchttps://gateway.beexar.comAllow gateway requests

Beexar games are responsive and adapt to the container size. For the best experience:

.game-container {
width: 100%;
max-width: 1280px;
height: 720px;
margin: 0 auto;
}
.game-container iframe {
width: 100%;
height: 100%;
border: none;
}
.game-container {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
}
.game-container iframe {
width: 100%;
height: 100%;
border: none;
}

On mobile, games are best displayed in landscape orientation at full viewport width:

@media (max-width: 768px) {
.game-container {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
}
}

GameAspect RatioMin WidthRecommended
Dice16:9320px1280x720
Plinko16:9320px1280x720
Slots16:9320px1280x720
Crash16:9320px1280x720

All games scale down gracefully to mobile viewport sizes.


When the player finishes playing, the game redirects to the return_url configured during launch:

  1. Player clicks “Back to Lobby” in the game
  2. Game redirects to return_url
  3. Your platform’s lobby page loads

If no return_url is provided, the game shows a “Session ended” message.


IssueCauseSolution
Game shows blankCSP blocking iframeAdd games.beexar.com to frame-src
No audioMissing allow="autoplay"Add autoplay to iframe allow attribute
Game too small on mobileContainer not full-widthUse 100vw / 100vh on mobile
CORS errors in consoleMissing CSP connect-srcAdd gateway domain to connect-src
”Session expired” messageToken expiredCreate a new session via launch API