MailChimp (OAuth2)

MailChimp has a simple API for working with your own data and a good library already exists for this use. However, to allow other MailChimp users to use an app you develop, the OAuth2 API allows those users to give or revoke access without creating a key themselves.

Registering a new app

Instructions for generating your own OAuth2 app can be found at It is worth reading that carefully before following the instructions below.

Login via, which will redirect you to where the prefix usX (X is an integer) is the subdomain you need to connect to. Click on your username in the top right corner and select Profile. On the next page select Extras then click API keys, which should lead you to:

App registration (where X is dependent on your account)

Fill in the form with the following URL for local development:

Development callback URL

Testing Locally

Note the requirement of https. If you would like to test OAuth2 authentication locally before deploying a default django project will raise errors because development mode does not support https. One means of circumventing this is to install django-extensions:

pip install django-extensions

add it to your INSTALLED_APPS


and then run:

./ runserver_plus --cert cert

which should allow you to test locally via Some browsers may require enabling this on localhost and not support by default and ask for permission.