JSON Element Reference
This topic describes the elements that can appear within a JavaScript Object Notation (JSON) response.
The elements that can appear in a JASON response are listed in the following table.
| Element | Description |
|---|---|
|
status |
This is the status of the user. The value can be one of the following strings: Online Away Idle BeRightBack Busy OutToLunch OnThePhone Offline |
|
statusText |
The user's status as a localized string. |
|
id |
The ID that was passed into the API call. |
|
displayName |
The Windows Live Messenger display name of the user. This value can be an empty string (""). |
|
mkt |
Specifies a culture ID indicating the language to which the statusText string should be localized. (For details, see the Supported Languages table later in this topic). If this element is omitted, a default value of en-US will be used. |
|
icon |
References an icon representing the user’s status. |
|
icon.url |
The URL of the status icon image. Applications should always use the presence API to get this URL (or use the presenceimage property instead). The actual URL is subject to change. |
|
icon.width |
The width of the status icon image in pixels. |
|
icon.height |
The height of the status icon image in pixels. |
|
result |
References a result representing the status of the request. |
|
result.code |
The numeric code representing the status of the request. |
|
result.response |
The text representation of the status of the request. The value pairs for result.code and result.response can be one of the following: result.coderesult.responseDescription 200SuccessSuccessful presence request. 302Successful Image RequestSuccessful presenceimage request. 400Bad RequestThere is a delegation token present, but no ID in the URL. 401Authorization FailedThe delegation token is invalid, or the ID in the URL does not match the ID for which the delegation token is valid. 404Not FoundAnonymous presence query failed because target user has not enabled presence queries for the entire Web. 414Request URI Too LongThe delegation token is too long. 500Internal Server ErrorInternal server error unrelated to request URI. 503Service Temporarily Unavailable Service temporarily unavailable unrelated to request URI.
|
The following code example shows an example of a JSON result.
{
"12BACD345678@apps.messenger.live.com": {
"status": "Online",
"statusText": "Online",
"displayName": "Name"
"statusicon": {
"url": "http://settings.messenger.live.com/static/w13r2/Conversation/img/Status_Online.gif",
"height": 16,
"width": 16
},
"result": {
"code": 200,
"response": "Success"
}
}
Appendix A: Supported Languages contains a list of all supported languages for the Windows Live Presence API.
