You can also easily use Mash's SDK – which streamlines the process – more is at getmash.com if curious.