<button onclick="shorten()">Create Short Link</button>
<script>
function shorten() {
var url = "https://google.com";
fetch("https://1shortlink.com/api?api=YOUR_NEW_API_KEY&url=" + encodeURIComponent(url))
.then(res => res.json())
.then(data => {
alert("Short link: " + data.shortenedUrl);
});
}
</script>