Application Contact List (Messenger Connect)
|Current information about Live Connect is now available in the Windows Live Developer Center. The information in the following sections is provided for legacy purposes only.|
An application contact list defines the contacts with which an application user can communicate. An application contact list contains the following elements: a contact element and a TS element.
Each contact element is an application contact. An application contact is a bidirectional relationship in which the user and the contact can see each other's presence and send instant messages to one another. Each contact is specified with the id attribute, which is a CID in signed decimal format. A user can have as many as 250 application contacts.
The TS element is a time stamp that indicates the current time.
Depending on the method, an application contact list data structure may represent the following:
The complete application contact list, when used with SetContacts or the UI
A set of application contacts to add, when used with AddContacts.
A set of application contacts to remove, when used with RemoveContacts.
An application contact list is an XML structure that looks like the following sample.
<Ticket> <Contact id="64801418014"/> <Contact id="44801418141"/> <Contact id="11447918014"/> <Contact id="-35143418014"/> <Contact id="-89571418014"/> <Contact id="58711418014"/> <TS>2009-02-02T12:34:56Z</TS> </Ticket>
The following code illustrates the application contact list schema.
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="Ticket"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" name="Contact"> <xs:complexType> <xs:attribute name="id" type="xs:string" use="required" /> </xs:complexType> </xs:element> <xs:element name="TS" type="xs:dateTime" /> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
Applications provide Windows Live Messenger with the application contact list and a signed hash of the contact list. The signature is defined as follows:
Signature = base64(HMACSHA256(AppContactList, MessengerApplicationKey))
Signature is the base64 encoding of the AppContactList hashed with the MessengerApplicationKey for the application by using the HMACSHA256 algorithm.
AppContactList is an application contact list, as defined in the previous section.
MessengerApplicationKey is the Messenger Application Key (Messenger Connect).