Good afternoon! I’m trying to implement a button on my website to switch between scenes in my project, but it seems like my API is not active since the project on Shapspark isn’t receiving the test message. I would like to know how I can resolve this issue. I have the highest plan, which includes access to the API. Can anyone help me?
Are you embedding a Shapespark scene as an iframe on your web page and using postMessage to communicate your we page with the scene? Does the scene contain custom JavaScript code (eg. injected via body-end.html) to handle the messages coming from the web page?
Everything you mentioned was what I did. except the body end part. Can you help me?
Hello, Shapespark Team,
I am trying to integrate my Shapespark project into an external website using the API. However, I am encountering Cross-Origin Block issues in the browser because the origin site (https://arquisefaz3d.com.br) doesn’t seem to be authorized.
After troubleshooting the issue with ChatGPT, we identified some solutions and arrived at the conclusion that the origin domain must be whitelisted for the integration to work correctly.
Could you please configure my Shapespark project (3D scene) to allow requests from the domain https://arquisefaz3d.com.br?
Thank you for your support!
I can see you’re already using body-end.html in your scene. Whitelisting is not required for the integration if you communicate your parent web page with the iframe using postMessage. Take a look at this post to learn what code you need to add on both ends: in the parent web page, and in the body-end.html of the scene.