// Use from server-side or CORS-enabled environment
fetch("https://buythefans.com/api/v2", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
key: "YOUR_API_KEY",
action: "add",
service: "1",
link: "https://example.com/post",
quantity: "100"
})
})
.then(r => r.json())
.then(console.log)
.catch(console.error);
The examples intentionally use `YOUR_API_KEY` placeholder. Do not embed a live key in public client-side code.
Best practice: call provider API from your server and keep the key secret.