Versions Compared

Key

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

To use the FreeAgent connector, add the <freeagent.init> element in your configuration before carrying out any other FreeAgent operations. 

FreeAgent uses OAuth 2.0. OAuth 2.0 allows FreeAgent users to authorize third party apps to access their data without sharing their FreeAgent login details. Instead, an app will have one access token and one refresh token for each authorized FreeAgent user account. For more information on authentication, see https://dev.freeagent.com/docs/oauth.

Code Block
languagexml
titleinit
<freeagent.init>
	<accessToken>{$ctx:accessToken}</accessToken>
    <apiUrl>{$ctx:apiUrl}</apiUrl>
</freeagent.init>
Properties 
  • accessToken: The access token.
  • apiUrl: The API URL of FreeAgent.

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 formatter
Code Block
languagexml
<messageFormatter contentType="text/html" class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
Required message builder
Code Block
languagexml
<messageBuilder contentType="text/html"	class="org.wso2.carbon.relay.BinaryRelayBuilder"/>

Configuring the operations

Now that you have connected to FreeAgent, use the information in the following topics to perform various operations with the connector. After you have completed your configurations, see Testing the FreeAgent Integration.

...