Looking for sample code?

You've come to the right place

Page Updated: this page was last updated on Dec 10th 2014

Feel free to use the example code to help familiarise yourself with the AccountRight API. Well will be adding to the list of languages and libraries as we go.

We have setup an official MYOB GitHub place for samples, SDK's and more. Github is a great tech industry repository place for code, samples, projects etc.

This is for us to share with the developer community and also to allow the development community to make updates, improvements and submit these back for others to use and build on.

VB.NET

Sample VB.NET App (Using SDK)

Our VB.NET sample shows you how to use the new .Net SDK released with version 2 of the API. The sample demonstrates how to use the SDK to connect to a local and/or cloud server including authenticating via OAuth 2. Functionally the sample displays the company files allowing a user to login as well as how to support paging using the API through the Invoice endpoint. The sample also shows how to view and create service invoices.

The sample is ready to work against the local server but can also connect to the cloud server by simply providing your developer key and secret with the redirect URL set to http://desktop. Instructions to get started with the sample can be found at the blog post VB.Net sample using the new AccountRight API SDK

MYOB Sample API VB.NET App on GitHub.

C#

Sample C# App (Using SDK)

Desktop sample app demonstrating accessing the AccountRight Live API using the SDK in C# with version 2 of the API. The sample demonstrates how to use the SDK to connect to a local and/or cloud server including authenticating via OAuth 2. Just like our vb.net sample, it displays the company files allowing a user to login as well as how to support paging using the API through the Invoice endpoint. The sample also shows how to view and create service sale invoices.

The sample is ready to work against the local server but can also connect to the cloud server by simply providing your developer key and secret with the redirect URL set to http://desktop.

MYOB Sample C# App Using .NET SDK on GitHub.

PHP samples

OAuth authentication

This sample shows you how to use the class.myob_oauth.php to request access tokens through the MYOB oauth server. It also shows you how to make a request through the API once you have an access token, by setting it in the header of your request.

Sample Contacts App

This php sample app we have is a responsive designed contacts app. We make use of the AccountRight API to fetch and update Suppliers, Customers and Employees from the AccountRight system. Then making use of the Twitter BootStrap CSS framework we have a web UI that responds to the size fo the screen and shows content in specific layouts for desktop, tablet or mobile phone.

MYOB sample contacts app using AccountRight Live API on GitHub.

Windows Mobile

Sample Windows Mobile App

The purpose of this sample app is to demonstrate how to handle the authorisation process i.e. handling the process where a user allows your application to access their MYOB Company File data hosted "in the cloud".

MYOB Sample API Windows Mobile App on GitHub.

 

node.js

node.js Sample App

This is a simple node.js application that will show you how to connect to our OAUTH server, and make calls to the API to fetch data.

node.js AccountRight Live API sample on GitHub.

 

Ruby

Ruby Gem for MYOBapi

Strictly speaking not a code sample, but thanks to David Lumley we have a Ruby Gem you can use to talk to the MYOBapi

MYOB AccountRight Live API - Ruby Gem on GitHub.

 

Java

Java interface for MYOBapi

A Java interface to interact with the AccountRight API for both desktop and cloud access points, thanks to the anahata team for opening this up to the developer community.

MYOB AccountRight Live API - Java Interface.