CORS error on Genesys Messenger in Next.js

Hi everyone,

I’m trying to embed the Genesys Messenger widget into a React Next.js app. The widget loads fine in development, but when I deploy to Vercel, I get a CORS error trying to fetch the initial config from /api/v2/conversations/messaging/visitors.

I’ve added our domain to the allowed origins in the admin settings, but it’s still blocking the request. Here’s the error in the console:

Access to fetch at ‘https://api.us.genesys.cloud/api/v2/conversations/messaging/visitors’ from origin ‘https://myapp.vercel.app’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.