To use the MailChimp connector, add the <mailchimp.init>
element in your configuration before carrying out any other MailChimp operations.
MailChimp uses the access token as an API key when considering authentication. For more information on authentication, see http://apidocs.mailchimp.com/oauth2/.
init
<mailchimp.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> <format>{$ctx:format}</format> </mailchimp.init>
Properties
apiUrl:
The base endpoint URL of the MailChimp API.apiKey:
The API authentication key to access the MailChimp API.format:
The format of the response expected from the API. It can be either JSON or XML.
Configuring the message formatters and builders
Ensure that the following Axis2 configurations are added and enabled in the <ESB_HOME>\repository\conf\axis2\axis2.xml
file.
Required message formatters
messageFormatters
<messageFormatter contentType="application/json" class="org.apache.synapse.commons.json.JsonStreamFormatter"/>
Required message builders
messageBuilders
<messageBuilder contentType="application/json" class="org.apache.synapse.commons.json.JsonStreamBuilder"/>
Configuring operations
Now that you have connected to MailChimp, use the information in the following topics to perform various operations with the connector.