Socket
Socket
Sign inDemoInstall

lambda-mailchimp

Package Overview
Dependencies
13
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lambda-mailchimp

Create or update a Mailchimp subscriber with an AWS lambda function


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
545 kB
Created
Weekly downloads
 

Readme

Source

lambda-mailchimp

Create or update a Mailchimp subscription with this simple lambda function. Use it as a proxy for the Mailchimp API from your website/app without exposing your API key or running into CORS problems.

Usage

Setup

Get your username, API key, data center and list or audience id from your Mailchimp account.

  • Create an API key here: https://admin.mailchimp.com/account/api/
  • Your datacenter is the the first subdomain part, e.g. us18 when viewing your admin pages
  • Find your unique list or audience id in your list or audience settings

Make a copy of the .env.sample

$ cp .env.sample .env

and fill in your details.

Upload

You can create a .zip file for uploading your lambda function to AWS with

$ npm run zip

API Gateway

After creating your new lambda function, uploading the zip file and saving your changes you add a new API Gateway trigger, leave all defaults as suggested by AWS and you're good to go.

You can send all parameters that should be proxied with a POST request to your new API endpoint, at least email_address is required. Read more about the optional parameters:

https://mailchimp.com/developer/reference/lists/list-members/

Return values

The lambda function transparently returns all reponse values from the Mailchimp API

License

MIT

Keywords

FAQs

Last updated on 24 May 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc