In a Next.js App Router app, put the ThoughtSpot Visual Embed SDK in a Client Component: a ‘use client’ file that calls init() once at the top, behind a typeof window check, and renders the embed. Mint authentication tokens in a Route Handler, and render the component from your Server Component page. Calling init() from a Server Component fails the build.