Content-Type": "application/json",
            },
          }
        );
        if (!response.ok) {
          throw new Error("Failed to get enrollment token");
        }
        return await response.json();
      };

      // here we render the page content
      document.addEventListener("DOMContentLoaded", async function () {
        const platform = getPlatform();

        // quick exit if platform is unsupported
        if (platform === "unsupported") {
          renderContent("unsupported-template")