<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Prewalk</title>
    <description>The latest articles on DEV Community by Prewalk (@prewalk).</description>
    <link>https://dev.to/prewalk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4246579%2Fc6d69cd2-364e-4b72-8a1d-dbd055566830.png</url>
      <title>DEV Community: Prewalk</title>
      <link>https://dev.to/prewalk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prewalk"/>
    <language>en</language>
    <item>
      <title>Automating 360 virtual tours from your own app: a REST + webhooks workflow</title>
      <dc:creator>Prewalk</dc:creator>
      <pubDate>Sun, 15 Nov 2026 21:43:46 +0000</pubDate>
      <link>https://dev.to/prewalk/automating-360deg-virtual-tours-from-your-own-app-a-rest-webhooks-workflow-1ekl</link>
      <guid>https://dev.to/prewalk/automating-360deg-virtual-tours-from-your-own-app-a-rest-webhooks-workflow-1ekl</guid>
      <description>&lt;p&gt;If you run a listing platform, a property CRM or an archviz pipeline, clicking through a tour editor for every property doesn't scale. You want your software to push panoramas in and get a shareable tour link back. Here's the shape of that workflow, using the &lt;a href="https://prewalk.co" rel="noopener noreferrer"&gt;Prewalk&lt;/a&gt; API as the concrete example (it's part of our Enterprise plan), but the pattern applies to most media-processing APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  The flow in one picture
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Create an empty tour.&lt;/li&gt;
&lt;li&gt;Upload each 360° panorama as a scene.&lt;/li&gt;
&lt;li&gt;Wait for processing (webhooks or a progress stream, not polling in a tight loop).&lt;/li&gt;
&lt;li&gt;Set visibility and hand the link to your user.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  0. Basics that save you an afternoon
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use the canonical host &lt;code&gt;https://prewalk.co&lt;/code&gt; as the base URL. Hitting a host that redirects is a classic way to lose the &lt;code&gt;Authorization&lt;/code&gt; header, because many HTTP clients drop it on cross-host redirects.&lt;/li&gt;
&lt;li&gt;Auth is a bearer token: &lt;code&gt;Authorization: Bearer pw_...&lt;/code&gt;. Keys are scoped (&lt;code&gt;read&lt;/code&gt;, &lt;code&gt;write&lt;/code&gt;, &lt;code&gt;stats&lt;/code&gt;), so give your uploader &lt;code&gt;write&lt;/code&gt; and your dashboard &lt;code&gt;read&lt;/code&gt; + &lt;code&gt;stats&lt;/code&gt;, not one key that can do everything.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET /api/me&lt;/code&gt; tells you which account and scopes a key has. Call it once at startup and fail loudly if a scope is missing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. Create the tour
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST https://prewalk.co/api/tours \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $PREWALK_KEY"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"title": "Apartment 3B"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Store the returned tour ID next to your own listing ID. IDs are short lowercase strings, so they're fine as a column in your table.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Upload panoramas as raw bodies
&lt;/h2&gt;

&lt;p&gt;Scenes go to &lt;code&gt;POST /api/tours/{id}/scenes&lt;/code&gt;. The interesting design choice: the image is sent as the &lt;strong&gt;raw request body&lt;/strong&gt; (JPG, PNG, TIFF or WebP), not multipart. File name and upload order travel in headers (see the API reference for the exact names).&lt;/p&gt;

&lt;p&gt;Why that matters in practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can stream a file from disk or object storage straight into the request without buffering a multipart body in memory. That's noticeable with 16K panoramas.&lt;/li&gt;
&lt;li&gt;Retrying one failed scene is trivial, because each scene is its own request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before uploading, validate the one rule that breaks most tours: the image must be a full 2:1 equirectangular panorama (width exactly twice the height). Checking it client-side gives your user a clear error instead of a confusing processing failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Don't poll: use webhooks
&lt;/h2&gt;

&lt;p&gt;Processing a large panorama takes a moment (tiling, a preview, then the sharp version, plus a VR version for stereo images). Instead of polling, register a webhook and react to events such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;scene.ready&lt;/code&gt;: the scene can be viewed.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;scene.sharpened&lt;/code&gt;: full resolution is available.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;scene.vr_ready&lt;/code&gt;: the headset version is ready.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;scene.failed&lt;/code&gt;: show the error to the user.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each delivery is signed with HMAC-SHA256, so verify the signature before trusting the payload, and make your handler idempotent: deliveries are retried for a few hours if your endpoint is down, which means you can receive the same event twice.&lt;/p&gt;

&lt;p&gt;If you'd rather watch progress live (for an upload progress bar, say), there's also a server-sent events stream per tour.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Publish
&lt;/h2&gt;

&lt;p&gt;Visibility is a single call: &lt;code&gt;POST /api/content/{id}/visibility&lt;/code&gt; with &lt;code&gt;link&lt;/code&gt;, &lt;code&gt;public&lt;/code&gt; or &lt;code&gt;password&lt;/code&gt;. Link-only is a good default for listings that shouldn't appear in public galleries.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Respect the rate limit
&lt;/h2&gt;

&lt;p&gt;The limit is 600 requests per minute per key. When you exceed it you get a &lt;code&gt;429&lt;/code&gt; with a &lt;code&gt;Retry-After&lt;/code&gt; header in seconds. Honour that header instead of exponential guessing, and you'll never need to think about it again.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Close the loop with stats
&lt;/h2&gt;

&lt;p&gt;With a &lt;code&gt;stats&lt;/code&gt;-scoped key you can pull views per tour or project (or a CSV export) back into your CRM, so agents see which listings people actually walk through.&lt;/p&gt;




&lt;p&gt;The full endpoint list, headers and a curl walkthrough are in the &lt;a href="https://prewalk.co/blog/api-reference" rel="noopener noreferrer"&gt;Prewalk API reference&lt;/a&gt;. If you're building something similar for panoramas or other heavy media, I'm curious how you handle uploads and retries; drop it in the comments.&lt;/p&gt;

</description>
      <category>api</category>
      <category>webdev</category>
      <category>backend</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Embedding a 360 virtual tour on any website: iframe vs. script, sizing and the gotchas</title>
      <dc:creator>Prewalk</dc:creator>
      <pubDate>Sun, 15 Nov 2026 21:42:33 +0000</pubDate>
      <link>https://dev.to/prewalk/embedding-a-360-virtual-tour-on-any-website-iframe-vs-script-sizing-and-the-gotchas-436a</link>
      <guid>https://dev.to/prewalk/embedding-a-360-virtual-tour-on-any-website-iframe-vs-script-sizing-and-the-gotchas-436a</guid>
      <description>&lt;p&gt;Real estate and architecture sites increasingly put a walkable 360° tour right on the listing page instead of linking out. Under the hood it's just an iframe, but there are a few decisions that decide whether it feels native or broken. This is what we've learned building embeds for &lt;a href="https://prewalk.co" rel="noopener noreferrer"&gt;Prewalk&lt;/a&gt;, a browser-based 360° tour tool, but most of it applies to any panorama viewer.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Two ways to embed: iframe + script, or iframe only
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Iframe + a small script (the nicer option)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The script listens for messages from the viewer and resizes the iframe to fit the content, so you don't hard-code a height.&lt;/li&gt;
&lt;li&gt;It can also hand off to real full screen on your own page, which matters a lot on phones.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Iframe only, fixed height (the fallback)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use it when the site builder strips &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags (Wix, Google Sites and many CMS text fields do).&lt;/li&gt;
&lt;li&gt;You choose the height yourself. On iPhone Safari, full screen inside a cross-origin iframe is limited, so a fixed-height embed usually opens the tour in a new tab instead.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rule of thumb: start with iframe + script. If the embed doesn't resize or full screen does nothing, the platform blocked the script, so switch to the fixed-height version.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Make the fixed-height version responsive
&lt;/h2&gt;

&lt;p&gt;If you can't run a script, at least let the browser keep the ratio:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"tour"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt;
    &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/embed/TOUR_ID"&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Apartment 3B: 360° virtual tour"&lt;/span&gt;
    &lt;span class="na"&gt;loading&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"lazy"&lt;/span&gt;
    &lt;span class="na"&gt;allow&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"fullscreen; xr-spatial-tracking"&lt;/span&gt;
    &lt;span class="na"&gt;allowfullscreen&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
  &lt;span class="nc"&gt;.tour&lt;/span&gt; &lt;span class="nt"&gt;iframe&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;aspect-ratio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;600px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;.tour&lt;/span&gt; &lt;span class="n"&gt;iframe&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;aspect-ratio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="cm"&gt;/* taller on phones */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;loading="lazy"&lt;/code&gt; keeps a heavy WebGL viewer from competing with the rest of your page on first load.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;xr-spatial-tracking&lt;/code&gt; lets the viewer offer VR mode in headset browsers.&lt;/li&gt;
&lt;li&gt;A real &lt;code&gt;title&lt;/code&gt; helps screen readers and is free.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Phones: don't hijack the page scroll
&lt;/h2&gt;

&lt;p&gt;A 360° viewer wants every drag; your visitor wants to scroll past it. A good compromise is two-finger navigation on touch devices: one finger scrolls the page, two fingers look around. Prewalk exposes this as an embed option; if your viewer doesn't, at least avoid making the iframe full height on mobile.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Where to paste it on common builders
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;WordPress:&lt;/strong&gt; a Custom HTML block (or the Text/Code tab in the classic editor).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wix:&lt;/strong&gt; Add Elements &amp;gt; Embed Code &amp;gt; Embed HTML. Usually needs the fixed-height version.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Squarespace:&lt;/strong&gt; a Code block set to HTML. Scripts run on paid plans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Webflow:&lt;/strong&gt; an Embed element. It renders on the published site, not in the designer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Sites and similar:&lt;/strong&gt; fixed height only.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most common mistake: pasting the code into a normal text block, which just prints the HTML as text.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Content Security Policy and "refused to connect"
&lt;/h2&gt;

&lt;p&gt;If your site sends a CSP header, the viewer's origin has to be allowed in &lt;code&gt;frame-src&lt;/code&gt; (or &lt;code&gt;child-src&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="nc"&gt;Content&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Security&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Policy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="s1"&gt;'self'&lt;/span&gt; &lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//prewalk.co;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The opposite direction matters too: the tour host may restrict which sites can embed it (Prewalk lets you turn embedding off or, on paid plans, allow-list specific domains). "Refused to connect" in the iframe is almost always one of these two.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Privacy isn't what you think
&lt;/h2&gt;

&lt;p&gt;A tour shared as "link only" is not private once it's embedded: anyone who can open your page can watch it. Use password protection if that matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Small things that make it feel native
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Match the viewer theme (light or dark) to the page background.&lt;/li&gt;
&lt;li&gt;Make sure every room has a way back. A visitor stuck in the bathroom on your listing page just leaves.&lt;/li&gt;
&lt;li&gt;Pick the opening view deliberately. It's also what link previews show.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you want to try this with your own panoramas, &lt;a href="https://prewalk.co" rel="noopener noreferrer"&gt;Prewalk&lt;/a&gt; has a free plan with the embed code included, and the full walkthrough is in our guide: &lt;a href="https://prewalk.co/blog/embed-on-your-website" rel="noopener noreferrer"&gt;Embed a tour on your website&lt;/a&gt;. Happy to answer questions in the comments.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
