# Getting "Unauthorized WOPI host" error

**URL:** <https://forum.collaboraonline.com/t/getting-unauthorized-wopi-host-error/3864>\
**Category:** Installation & Configuration\
**Created:** [July 9, 2025, 3:42am UTC](https://forum.collaboraonline.com/t/getting-unauthorized-wopi-host-error/3864 "2025-07-09T03:42:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chandrayog](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@Chandrayog](https://forum.collaboraonline.com/u/Chandrayog)\
**Post date:** [July 9, 2025, 3:42am UTC](https://forum.collaboraonline.com/t/getting-unauthorized-wopi-host-error/3864/1 "2025-07-09T03:42:02Z")

</div>

I have configured a Collabora Online instance using Docker and integrated it with my [ASP.NET](http://ASP.NET) Core (Blazor) application. The goal is to enable in-browser editing of Microsoft Word documents using Collabora via the WOPI protocol.

The backend WOPI endpoints are functioning correctly — I’m able to retrieve document metadata and content (e.g., `/wopi/files/{id}`, `/wopi/files/{id}/contents`) successfully via tools like Swagger or direct HTTP calls.

However, when attempting to load the document within the Collabora editor embedded in an `<iframe>` on the Blazor frontend, I receive the following error:

> **Unauthorized WOPI host. Please try again later and report to your administrator if the issue persists.**

It seems the request reaches the Collabora instance, but fails due to WOPI host validation. The `WOPISrc` used in the iframe matches the backend host (e.g., `http://localhost:5169/wopi/files/{id}`), and I have added the relevant hostnames (`localhost`, `host.docker.internal`) to the `<wopi>` section in `coolwsd.xml`. SSL is also disabled via `--o:ssl.enable=false`.

What could be causing the WOPI host to be rejected despite being properly registered in `coolwsd.xml`, and how can I resolve this issue to allow document editing in the browser?

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/collaboraonline/original/2X/4/4bec82d4834c05570d4a80d83b7a73e294a49b15.png)

---

<div class="post-metadata">

**Author:** ![darshan](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/darshan/32/2230_2.png) [@darshan](https://forum.collaboraonline.com/u/darshan)\
**Post date:** [July 10, 2025, 6:09am UTC](https://forum.collaboraonline.com/t/getting-unauthorized-wopi-host-error/3864/2 "2025-07-10T06:09:15Z")

</div>

Hello @Chandrayog

When Collabora “rejects” your WOPI iframe with

Unauthorized WOPI host. Please try again later …

it almost always comes down to the fact that the Host header (and/or the public URL) that Collabora actually sees does not exactly match one of the entries you put in your coolwsd.xml

• Check the actual Host header in the container logs  
• Add that exact host[:port] to …  
• (Optionally) set \<public\_url\> to your iframe’s base URL  
• Mount the updated file into /etc/loolwsd/coolwsd.xml and restart

Once the Host header that Collabora sees lines up with an entry in your list (or with your public\_url), the “Unauthorized WOPI host” error will go away and your document will load inside the iframe.

you can also checkout the doctNet integration example here as well : [collabora-online-sdk-examples/webapp/dotNET at master · CollaboraOnline/collabora-online-sdk-examples · GitHub](https://github.com/CollaboraOnline/collabora-online-sdk-examples/tree/master/webapp/dotNET)

Thanks  
Darshan

---

<div class="post-metadata">

**Author:** ![darshan](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/darshan/32/2230_2.png) [@darshan](https://forum.collaboraonline.com/u/darshan)\
**Post date:** [July 15, 2025, 1:43pm UTC](https://forum.collaboraonline.com/t/getting-unauthorized-wopi-host-error/3864/3 "2025-07-15T13:43:07Z")

</div>


