I’m trying to embed the Genesys Cloud Messenger widget in a Next.js app. The script loads fine in the browser console, but when I deploy to Vercel, I get a CORS error on the initial API call.
Access to fetch at 'https://api.mypurecloud.com/api/v2/conversations' from origin 'https://myapp.vercel.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Is there a specific header I need to set in the widget config? Or is this a Next.js proxy issue? I’ve tried adding the origin to the allowed list in Genesys settings but it’s not helping.