Jump to content

Embed an external webpage onto my site

Recommended Posts

I am trying to add an external webpage to my site. I first tried adding an Embed Block via URL but the website: https://offline.licensespring.com/ doesn't allow that type of connection. I reached out to LicenseSpring and they said that I can embed it directly into the backend of my website, but I can't figure out how. I tried copying/pasting the JavaScript code from here https://docs.licensespring.com/license-api/activation-deactivation/offline-activation#QO5GD into a Code Block but that didn't work. Screenshot2023-10-11120702.thumb.png.baa54cfbb3db181df8fa0c66240b25d6.png  JavaScript Code:

var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Date", "string");
myHeaders.append("Authorization", "string");

var raw = "{\"Payload\":\"Object\"}";

var requestOptions = {
   method: 'POST',
   headers: myHeaders,
   body: raw,
   redirect: 'follow'
};

fetch("/api/v4/activate_offline", requestOptions)
   .then(response => response.text())
   .then(result => console.log(result))
   .catch(error => console.log('error', error));

Edited by terean
Pasted JS code
Link to comment
  • Replies 1
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.