Error when creating an embed URL

I want to embed my Retool apps into my existing website. I followed this guide. When calling the api, I get the following error: You must call this endpoint from a custom domain

This is the payload I send along with the request (and of course the API token as Authentication Header):

"landingPageUuid" => "my-uuid-id",
                "groupIds" => [12345],
                "externalIdentifier" => "token",
                "userInfo" => [
                    "firstName" => "Fabian",
                    "lastName" => "Hagen",
                    "email" => ""

How can I add a custom domain? Is it possible to set multiple custom domains? In my usecase, we have for example dev, QA, staging and prod. Each running under a different top level domain.

Okay, the fix was quiet easy..

I had to add a custom domain. Then I call the api on the custom domain instead of the Retool domain. Now it works..

Maybe the docs should be more detailed here..

Hey @Fabian_Hagen, glad you got it working! We'll pass along your feedback to our doc team :slightly_smiling_face:.