This topic describes the elements that can appear within a JavaScript Object Notation (JSON) response.
|
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.code
result.response
Description
200
Success
Successful presence request.
302
Successful Image Request
Successful presenceimage request.
400
Bad Request
There is a delegation token present, but no ID in the URL.
401
Authorization Failed
The delegation token is invalid, or the ID in the URL does not match the ID for which the delegation token is valid.
404
Not Found
Anonymous presence query failed because target user has not enabled presence queries for the entire Web.
414
Request URI Too Long
The delegation token is too long.
500
Internal Server Error
Internal server error unrelated to request URI.
503
Service 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 full list of all supported languages for the Windows Live Presence API.
Concepts
Querying with the Windows Live Presence API