Anyone with WiX-code experience help me with iFrame issues

Hello everyone!

I am trying to make a website that allows college students to locate free food on campus. For this I am using Google Sheets API and Google Maps API. I am having an issue with the Google Sheets API not being able to display in an iFrame weather that be WiX or jsbin. The code does contain API keys so I am trying to hide those in the backend Wix-code and hopefully that solves the issue.
For me unfortunately I am having trouble understanding how to call backend from a WiX iFrame as the documentation is still fairly new. I am also having a hard time understanding why the script will not display in an iFrame as is. I suspect this may be due to the “onload” attribute or due to the code containing an API key it wants to hide.
This code currently works locally but not on WiX/iFrame

1 Like

Backend code can’t be called from an HtmlComponent (iFrame). You will need to call the backend code from the page’s code, and then send a message with the appropriate information to the HtmlComponent.