1

I been trying to get mailchimp with my react project but for the love of me just can't. I don't know why I can't get the ping and despite having the node module installed, it tells me it isnt.

im using these docs - https://mailchimp.com/developer/marketing/guides/quick-start/

and this code with ofcourse my information. Any clues, am I missing a key step here? has anyone got experience with this and if so, can i see your code for it ?

const mailchimp = require("@mailchimp/mailchimp_marketing");

mailchimp.setConfig({
  apiKey: "YOUR_API_KEY",
  server: "YOUR_SERVER_PREFIX",
});

async function run() {
  const response = await mailchimp.ping.get();
  console.log(response);
}

run();
someone
  • 661
  • 1
  • 9
  • 26

0 Answers0