Open Hendler opened 9 years ago
also you should json.dumps(...)
the payload you are sending in the data, otherwise it'll result in a JSON Parse Error.
payload = json.dumps({"email_address": email, "status": "subscribed"})
response = requests.post(endpoint, auth=('apikey', mailchimp_api_key), data=payload)
That's not true, @dimmg . If you use the "json" attribute instead of the "data" attribute, it will do the json.dumps() for you.
e.g. Maybe one for adding members: