Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.



  <link rel="stylesheet" href="" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
  <title>Getting started with API -</title>

  <div class="container pt-5">
      <div class="row">
        <div class="col-6">
          <h1> - API Playground</h1>
          <p><a href="" target="_bland">Getting started docs</a></p>
          <form onsubmit="event.preventDefault(); refreshIframeUrl()" class="mt-4">
            <div class="mb-3">
              <label for="playUrl" class="form-label">Play url</label>
              <input type="text" class="form-control" id="playUrl" placeholder="" >
              <div class="form-text">Copy paste the <b>playUrl</b> field provided by the endpoint, and set a <b>username</b></div>
            <div class="mb-3">
              <label for="username" class="form-label">Username</label>
              <input type="text" class="form-control" id="username" placeholder="John Doe">
            <div class="mb-3">
              <label for="externalUserId" class="form-label">External User Id (optional)</label>
              <input type="text" class="form-control" id="externalUserId" placeholder="Your system user ID">
              <div class="form-text">Only needed if you want to receive this reference on your server via Webhooks.</div>
            <p class="callout p-2">To emulate the second player, use a private navigation tab.</p>
            <div class="mb-3">
              <button class="btn btn-primary">Set iframe URL</button>
        <div class="col-6 d-flex flex-column justify-content-end ">
          <iframe id="game_frame" src="" frameborder="0"></iframe>
          <pre id="iframe_code_sample" class="text-bg-secondary p-3 mt-3"></pre>

    function refreshIframeUrl(event) {
      const playUrl = document.getElementById('playUrl').value;
      const username = document.getElementById('username').value;
      const externalUserId = document.getElementById('externalUserId').value;
      let iframeUrl = `${playUrl}?username=${username}`;
      if (externalUserId) {
        iframeUrl += `&externalUserId=${externalUserId}`;
      document.getElementById('game_frame').src = iframeUrl;
      document.getElementById('iframe_code_sample').innerText = `<iframe src="${iframeUrl}" frameborder="0"></iframe>`
      document.getElementById('iframe_code_sample').style.display = 'block';
      return false;



                body {
  display: flex;
  justify-content: center;
  margin: 60px 0 0 60px;
iframe {
  width: 500px;
  height: 500px;
  background: aliceblue;
#iframe_code_sample {
  display: none;
.callout {
  background: #FFFAEB;
  color: #877544;