Iframe Launch
Embed Phoenix prediction markets in an operator page
The Phoenix Prediction iframe is the prediction-market application that runs inside your site. Your page controls where it appears. Phoenix controls the market UI inside the frame.
URL Shape
https://embed.prediction.phoenixverse.io/o/{operator_code}?token={JWT}&experience={experience_key}| Part | Meaning |
|---|---|
{operator_code} | Your Phoenix Prediction operator code, for example acme |
token | A short-lived visitor or player launch JWT minted by your backend |
experience | A saved Phoenix Prediction admin configuration, for example homepage |
Phoenix will provide the final host for each environment.
Basic Embed
<iframe
src="https://embed.prediction.phoenixverse.io/o/acme?token=JWT&experience=homepage"
style="width: 100%; height: 720px; border: 0"
></iframe>This default mode works well when your page owns the frame size and the Phoenix Prediction iframe scrolls internally.
Recommended Attributes
<iframe
id="phoenix-prediction-embed"
title="Prediction markets"
src="https://embed.prediction.phoenixverse.io/o/acme?token=JWT&experience=homepage"
style="width: 100%; min-height: 720px; border: 0"
allow="clipboard-write"
></iframe>Keep the iframe source on HTTPS in every public environment. Do not place Phoenix Prediction launch tokens in logs, analytics URLs, or third-party tracking events.
Visitor and Player Launches
You can launch the iframe in two modes:
| Mode | Use when | Allowed behavior |
|---|---|---|
| Visitor | User is not logged in, or you want browse-first UX | Feed, search, market detail, quotes |
| Player | User is authenticated on your site | Betting, portfolio, comments, player-specific activity |
When a visitor clicks a player-only action, the iframe sends phoenix:authRequired to the parent page. Your site logs the user in, mints a player token, and sends it back with phoenix:setToken.
Experience Key
experience is not a market ID. It selects a saved embed configuration for your operator.
Examples:
homepage
market-detail
compact-sidebar
casino-lobbyThe experience decides layout, features, theme, filters, allowed origins, and bridge behavior.