Title: Messenger Presence API Exposed
Slug: messenger-presence-api-exposed
Date: 2007-11-07 14:14:00
Author: Kartones
Lang: en
Tags: Development, Social Networks
Description: Exploring the MSN Messenger Presence API, including querying for online status, JSON data, and building an AJAX proxy for mashups and gadgets.

 <p>Today has been a great day, <strong>MSN Messenger control for web</strong> plus a <strong>presence API</strong>. The second one was a simple URL to query messenger.services.live.com and get a user's online status image. Not bad... but could be better!</p> <p>Playing a bit, I found that you can get the full JSON of the presence API, like this example:</p>

URL:
```
 http://messenger.services.live.com/users/a4ac90d9a8d3ed64%40apps.messenger.live.com/presence
```

JSON:
```
{
    status: "Away",
    icon: {
        height: 16,
        url: "http://settings.messenger.live.com/static/w13r1/Conversation/img/Status_Away.gif",
        width: 16
    },
    statusText: "Away",
    id: "a4ac90d9a8d3ed64@apps.messenger.live.com",
    displayName: "Kartones :: .Code :: 4.95T"
}
```


 <p>More interesting, don't you think? We can get the status text, image url, and even the display name! Much better for mashups and gadgets!</p> <p>So, by building a small AJAX proxy (<a href="https://blog.kartones.net/post/cloning-the-twitter-badge-with-javascript-amp-new-subdomain/">like the Twitter badge one</a>), <strong>Pedroafa</strong> (who is becoming the JSON master) and I can query for our "full" status and handle it with JSON.</p> <p>We've uploaded a small demo here (no longer available): https://kartones.net/demos/001/WindowsLiveStatusMessenger.htm<br><i>Note</i>: you must have opted in to show web presence in order to see your status.</p> <p> </p> <p>Or you can see my actual Messenger status in this blog, near the bottom of the left sidebar. Nice :)</p>
