Mobile app strips URL parameters when using window.openai.open

Hey everyone, I’m running into a weird issue with the mobile ChatGPT app and hoping someone can help.

When users click links in my widget, they work perfectly on desktop and mobile web, but completely break in the native mobile app (iOS). The URLs are getting stripped of their parameters.

For example, my server sends a URL like this:

https://www.google.com/search?ibp=oshop&q=product&prds=catalogid:123456789,pvo:2&gl=us

But when it opens on mobile, it’s just:

https://www.google.com/search?ibp=oshop&q=product

All the important stuff (prds, catalogid, etc.) is gone.

I’m using the standard approach:

if (window.openai?.openExternal) {
  window.openai.openExternal({ href: product.url });
}

I’ve verified the server is sending complete URLs, and I can see in the browser console on desktop that the widget is receiving them correctly. The same exact conversation works fine on web but fails on the mobile app.

I’m using widget versioning (@v2) so it’s not a caching issue. Both platforms show the safe-link modal, so I’m not using redirect_domains.

Has anyone else seen this? Is there something different about how openExternal works on mobile vs desktop?

I figured out a workaround!

The mobile app was stripping URL parameters when opening links (like ?catalogid=...), which broke the redirects.

The fix: instead of passing URLs with parameters directly to the app, I encode the full URL on my server and send a clean path like /r/encoded-string. When clicked, my server decodes it and redirects to the actual URL with all the parameters intact.

Works perfectly now on mobile app, mobile web, and desktop. The app doesn’t strip anything because there’s nothing to strip until the redirect happens server-side.

The only characters you can reliably use for the actual name parts of a URL are a-z , A-Z , 0-9 , - , . , _ , and ~ . Any other characters need to be url encoded.