thankful-sugar-8687
08/19/2023, 12:54 AMimport client from "@mailchimp/mailchimp_marketing";
client.setConfig({
apiKey: "XXXXXXXXXXXXXXXXXX",
server: "",
});
async function run() {
const response = await mailchimp.ping.get();
console.log(response);
}
run();
Is there anyway I can make this connection using an api call because using zapier is not cost effective at all. Will welcome any reccomendations thank youthankful-sugar-8687
08/19/2023, 2:02 AMapikey ${apiKey}
,
};
const data = {
email_address: "example@examplr",
status: "subscribed",
merge_fields: {
FNAME: "Elinore",
LNAME: "Grady",
BIRTHDAY: "01/22",
}
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error("Error:", error.response.data);
});prehistoric-plumber-47980
08/19/2023, 10:18 AM