Skip to content
 


Using the Xero API with Java

If you’re using Java then we recommend checking out the following wrapper library.

Xero API Private Application – contributed by @rossjourdain

Public and Partner applications

It is possible to use the Java Google OAuth library with the Xero API, but it does not appear the callback URL parameter is correctly handled. The following additional code snippet is required to set a callback url:


<%

Map params = new HashMap();
params.put(OAuth.OAUTH_CALLBACK, "https://www.xero.com/callback_url");
try {
	client.getRequestToken(accessor, null, params.entrySet());
	} catch (Exception e) {
		logger.error(e, e);
		throw new OAuthException("There was a problem getting the request
token");
}

%>

Keen to contribute a partner app example? Drop us a line and we’ll recognise your contribution here.