I am unable to get the embeds to work on production somehow.
I can successfully get a response and the embedUrl from the javascript function on local testing, but when I push it to production it returns me a Unauthorized error.
Sorry this isn't working well in your production environment. The only time we'll return unauthorized here is when your bearer token doesn't match a valid embed API token. Without knowing more about how you're deploying the parent app that's calling embed it's hard for me to say why those aren't matching. But a possibility is that the token isn't being set appropriately in your production environment.
Note that for security this should be called from a backend environment, not a frontend application running in the browser.
If you'd prefer to discuss the specifics of your setup directly I'm sending you a message on the forum with my email.
We use next.js to deploy the application, and I wonder if we need to move this API call to the BE. Though I doubt if this is the problem, as this works well on local system.
Also, I should probably confirm the bearer token with the embed API token.