SOAP
Contact List Management
Retrieving the Address Book
The address book is retrieved by posting this SOAP request to http://contacts.msn.com/abservice/abservice.asmx or https://contacts.msn.com/abservice/abservice.asmx for an encrypted connection.
POST /abservice/abservice.asmx HTTP/1.1
SOAPAction: http://www.msn.com/webservices/AddressBook/ABFindAll
Content-Type:text/xml; charset=utf-8
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Accept: */*
Host: contacts.msn.com
Content-Length: Variable Number
Connection: Keep-Alive
Cache-Control: no-cache
<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'>
<soap:Header>
<ABApplicationHeader xmlns='http://www.msn.com/webservices/AddressBook'>
<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>
<IsMigration>false</IsMigration>
<PartnerScenario>Initial</PartnerScenario>
</ABApplicationHeader>
<ABAuthHeader xmlns='http://www.msn.com/webservices/AddressBook'>
<ManagedGroupRequest>false</ManagedGroupRequest>
<TicketToken>Variable</TicketToken>
</ABAuthHeader>
</soap:Header>
<soap:Body>
<ABFindAll xmlns='http://www.msn.com/webservices/AddressBook'>
<abId>00000000-0000-0000-0000-000000000000</abId>
<abView>Full</abView>
<deltasOnly>true</deltasOnly>
<lastChange>0001-01-01T00:00:00.0000000-08:00</lastChange>
</ABFindAll>
</soap:Body>
</soap:Envelope>
- deltasOnly: whether you want to receive a full or partial address book update
- lastChange: the time your address book was last synchronized
deltasOnly and lastChange are only necessary if you want to do a partial address book update.
The server will then reply with this response.
HTTP/1.1 200 OK
Date: Wed, 02 Apr 2008 03:17:04 GMT
Server: Microsoft-IIS/6.0
P3P:CP="BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo"
X-Powered-By: ASP.NET
X-MSNSERVER: BAYABCHWBB128
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: Variable Number
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<ServiceHeader xmlns="http://www.msn.com/webservices/AddressBook">
<Version>13.02.2514.0000</Version>
<CacheKey>Base64 Encoded Data?</CacheKey>
<CacheKeyChanged>true|false</CacheKeyChanged>
<PreferredHostName>by4.contacts.msn.com</PreferredHostName>
</ServiceHeader>
</soap:Header>
<soap:Body>
<ABFindAllResponse xmlns="http://www.msn.com/webservices/AddressBook">
<ABFindAllResult>
<groups>
<Group>
<groupId>GUID</groupId>
<groupInfo>
<annotations>
<Annotation>
<Name>MSN.IM.Display</Name>
<Value>1</Value>
</Annotation>
<Annotation>
<Name>MSN.IM.HasSharedFolder</Name>
<Value>1</Value>
</Annotation>
The rest of these annotations have only been seen so far on ContactType of "Me"
<Annotation>
<Name>MSN.IM.MBEA</Name>
<Value>0</Value>
</Annotation>
<Annotation>
<Name>MSN.IM.GTC</Name>
<Value>1</Value>
</Annotation>
<Annotation>
<Name>MSN.IM.BLP</Name>
<Value>1</Value>
</Annotation>
<Annotation>
<Name>MSN.IM.RoamLiveProperties</Name>
<Value>1|2</Value>
</Annotation>
</annotations>
<groupType>c8529ce2-6ead-434d-881f-341e17db3ff8</groupType>
<name>Group Name</name>
<IsNotMobileVisible>true|false</IsNotMobileVisible>
<IsPrivate>true|false</IsPrivate>
</groupInfo>
<propertiesChanged />
<fDeleted>true|false</fDeleted>
<lastChange>ISO 8601 timestamp</lastChange>
</Group>
...
</groups>
<contacts>
<Contact>
<contactId>GUID</contactId>
<contactInfo>
<phones>
<ContactPhone>
<contactPhoneType>ContactPhoneMobile</contactPhoneType>
<number>Phone Number</number>
<isMessengerEnabled>true|false</isMessengerEnabled>
<propertiesChanged />
</ContactPhone>
</phones>
<groupIds>
<guid>GUID</guid>
</groupIds>
<emails>
<ContactEmail>
<contactEmailType>ContactEmailPersonal</contactEmailType>
<email>Email Address</email>
<isMessengerEnabled>true|false</isMessengerEnabled>
<Capability>0</Capability>
<MessengerEnabledExternally>true|false</MessengerEnabledExternally>
<propertiesChanged />
</ContactEmail>
</emails>
<contactType>Me|Regular|LivePending</contactType>
<quickName>Quick Name</quickName>
<firstName>First Name</firstName>
<lastName>Last Name</lastName>
<passportName>MSN Passport (Email Address)</passportName>
<IsPassportNameHidden>true|false</IsPassportNameHidden>
<displayName>Display Name</displayName>
<puid>0</puid>
<CID>Contact Id (Number, some prepended with a hyphen)</CID>
<IsNotMobileVisible>true|false</IsNotMobileVisible>
<isMobileIMEnabled>true|false</isMobileIMEnabled>
<isMessengerUser>true|false</isMessengerUser>
<isFavorite>true|false</isFavorite>
<isSmtp>true|false</isSmtp>
<hasSpace>true|false</hasSpace>
<spotWatchState>NoDevice</spotWatchState>
<birthdate>ISO 8601 timestamp</birthdate>
<primaryEmailType>ContactEmailPersonal</primaryEmailType>
<PrimaryLocation>ContactLocationPersonal</PrimaryLocation>
<PrimaryPhone>ContactPhonePersonal</PrimaryPhone>
<IsPrivate>true|false</IsPrivate>
<Gender>Unspecified</Gender>
<TimeZone>None</TimeZone>
</contactInfo>
<propertiesChanged />
<fDeleted>true|false</fDeleted>
<lastChange>ISO 8601 timestamp</lastChange>
</Contact>
...
</contacts>
<CircleResult>
<CircleTicket>
<?xml version="1.0" encoding="utf-16"?>
<SignedTicket xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" ver="1" keyVer="1">
<Data>Base64 Encoded "Ticket"</Sig>
</SignedTicket>
</CircleTicket>
</CircleResult>
<ab>
<abId>00000000-0000-0000-0000-000000000000</abId>
<abInfo>
<ownerPuid>0</ownerPuid>
<OwnerCID>Number</OwnerCID>
<ownerEmail>Email Address</ownerEmail>
<fDefault>true|false</fDefault>
<joinedNamespace>true|false</joinedNamespace>
<IsBot>true|false</IsBot>
<IsParentManaged>true|false</IsParentManaged>
<SubscribeExternalPartner>true|false</SubscribeExternalPartner>
<NotifyExternalPartner>true|false</NotifyExternalPartner>
<AddressBookType>Individual</AddressBookType>
<MessengerApplicationServiceCreated>false</MessengerApplicationServiceCreated>
</abInfo>
<lastChange>ISO 8601 timestamp</lastChange>
<DynamicItemLastChanged>ISO 8601 timestamp</DynamicItemLastChanged>
<RecentActivityItemLastChanged>ISO 8601 timestamp</RecentActivityItemLastChanged>
<createDate>ISO 8601 timestamp</createDate>
<propertiesChanged />
</ab>
</ABFindAllResult>
</ABFindAllResponse>
</soap:Body>
</soap:Envelope>
- CID: is zero for email only contacts
- birthdate: is 0001-01-01T00:00:00 if not set
passportName and displayName aren't in email only contacts