How to integrate mailchimp in node js

i am trying to integrate Mailchimp in node js and I am getting 401 error.
const baseUrl =;

const apikey = process.env.API_KEY;

const listId = process.env.LIST_ID;


const contact = {

  email_address: email,

  status: "subscribed"


const result = await


  headers: { Authorization:`Bearer ${apikey}` }});

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.