http://xn--gynkologie-s5a.de/wp-content/uploads/2019/11/cropped-KMC-Favicon.png
let linkRequest = {
destination: "https://www.youtube.com/channel/UCHK4HD0ltu1-I212icLPt3g",
domain: { fullName: "rebrand.ly" }
//, slashtag: "A_NEW_SLASHTAG"
//, title: "Rebrandly YouTube channel"
}
let requestHeaders = {
"Content-Type": "application/json",
"apikey": "YOUR_API_KEY",
"workspace": "YOUR_WORKSPACE_ID"
}
$.ajax({
url: "https://api.rebrandly.com/v1/links",
type: "post",
data: JSON.stringify(linkRequest),
headers: requestHeaders,
dataType: "json",
success: (link) = {
console.log(`Long URL was ${link.destination}, short URL is ${link.shortUrl}`);
}
});
Neueste Kommentare