Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 authenticationOAuth 2.0 Authentication for authenticating API calls. For more information on authentication, see http://apidocsdeveloper.mailchimp.com/documentation/mailchimp/guides/how-to-use-oauth2/.

Code Block
languagexml
titleinit
<mailchimp.init>
    <apiUrl>{$ctx:apiUrl}</apiUrl>
    <apiKey><apiVersion>{$ctx:apiVersion}</apiVersion>
    <accessToken>{$ctx:apiKeyaccessToken}</apiKey>
	<format>accessToken>
    <blocking>{$ctx:formatblocking}</format>blocking>
</mailchimp.init>
Properties  
  • apiUrl: The base endpoint URL of the MailChimp API.
  • apiKeyapiVersionThe API authentication key to access version of the MailChimp API.
  • formataccessToken: The format value 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
Code Block
languagexml
titlemessageFormatters
<messageFormatter contentType="application/json" class="org.apache.synapse.commons.json.JsonStreamFormatter"/>
Required message builders

...

languagexml
titlemessageBuilders

...

  • Access Token to access the MailChimp API via request.
  • blocking: The blocking parameter is helping connector performs the blocking invocations to MailChimp.

Configuring operations

Now that you have connected to MailChimp, use the information in the following topics to perform various operations with the connector. 

...