Created
February 9, 2019 05:02
-
-
Save SilencerWeb/b13712696935cdd1f97486d17bc29514 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
axios({ | |
method: 'post', | |
url: `https://us19.api.mailchimp.com/3.0/lists/${listId}/members/`, | |
data: JSON.stringify({ | |
email_address: '[email protected]', | |
status: 'subscribed', | |
}), | |
headers: { | |
Authorization: `Basic ${Buffer.from(`apikey:${API_KEY}`).toString('base64')}`, | |
'content-type': 'application/json', | |
}, | |
}) | |
.then((response) => console.log(response)) | |
.catch((error) => console.log(error)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment