The API can be used with the ActiveXControl object.
code:
var MessengerAPI = new ActiveXObject("Messenger.UIAutomation.1");
This might not work on all machines, and some features (like groups) will not be accessible/may crash wlm.
This will also cause Windows Messenger to run in the background.