Creating a Mailchimp OAuth 2.0 app
This guide is part of the Publicus connection catalog. Once you have the credentials, connect the service and Publicus stores them for you.
Distilled from Mailchimp’s own documentation: Access data on behalf of other users with OAuth 2 and Marketing API fundamentals. Retrieved 2026-07-03.
- Sign in to your Mailchimp account and navigate to the Registered Apps page (
https://<dc>.admin.mailchimp.com/account/oauth2/). - Click Register An App, fill out the Register An App form (including your app’s Redirect URI — Mailchimp strongly recommends, but does not enforce, HTTPS for it), and click Create.
- Copy the client_id and client_secret shown at the bottom of the page and store the secret securely — this is the only time the secret is displayed.
- To connect a user, redirect them to
https://login.mailchimp.com/oauth2/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI. There is noscopeparameter — Mailchimp OAuth grants access at the authorizing user’s role level. - After the user approves, Mailchimp redirects back to your
redirect_uriwith acodequery parameter. - Exchange the code with a POST to
https://login.mailchimp.com/oauth2/token, sendinggrant_type=authorization_code,client_id,client_secret,redirect_uri, andcodein the URL-form-encoded body. The response contains theaccess_token. - Fetch the account’s server prefix with
GET https://login.mailchimp.com/oauth2/metadatausing the headerAuthorization: OAuth <access_token>; read thedcfield from the JSON response. - Persist both the access token and the
dc— all API calls go tohttps://<dc>.api.mailchimp.com/3.0/, authenticating withAuthorization: Bearer <access_token>or HTTP Basic (any username, token as password). - Verify the connection with
GET https://<dc>.api.mailchimp.com/3.0/ping(responds{"health_status": "Everything's Chimpy!"}). - Tokens do not expire and there is no refresh token: “Mailchimp Marketing access tokens do not expire, so you don’t need to use a refresh_token. The access token will remain valid unless the user revokes your application’s permission to access their account.”
- To rotate the client secret later: on the Registered Apps page click Edit on the app, click Rotate in the Client secret field, type
ROTATEin the confirmation modal, and click Rotate Client Secret; the updated secret is shown once.
Connect it to Publicus
Section titled “Connect it to Publicus”Open Connections under Credentials, choose Mailchimp, and pick Mailchimp OAuth 2.0. Publicus asks for exactly the fields listed above and keeps them in your workspace’s secret storage.
See also: Mailchimp in the catalog.
This guide is maintained by Publicus and published under CC BY 4.0.