Table of contents:

Introduction

The Offline Instant Messaging (OIM) service, is a SOAP (XML) Web Service. It was introduced with MSNP11, though it was not used until MSNP13.

It's default HTTPS URL is https://ows.messenger.msn.com/OimWS/oim.asmx.

Not to be confused with the Offline Message Inbox.

Authentication

This service requires Passport Authentication, either using Passport SSI 1.4 or Passport SOAP (RST).

Read the section on the <Ticket> element about this.

Actions

Either https://messenger.msn.com/ws/2004/09/oim/Store or http://messenger.live.com/ws/2006/09/oim/Store2.

There is no known difference between either Store or Store2, other than the new domain.

The http://messenger.live.com/ws/2006/09/oim/Store2 action was introduced with MSNP15.

Client/Request

The following sub-headings are XML elements for the client's request.

soap:Envelope

This element has three attributes:

soap:Header

This element has four children:

From

This element has seven attributes:

To

This element has two attributes:

Ticket

This element has three attributes and only one optional attribute:

Sequence

This element has only one attribute:

This element has two children:

Identifier

This element has only one attribute:

This element's inner text is always http://messenger.msn.com

MessageNumber

This element's inner text should contain the same number used for the X-OIM-Sequence-Num header.

soap:Body

This element has two children:

MessageType

This element's inner text is always set to text.

Content

This element's inner text contains the MIME-formatted message.

Notable headers of such are these five:

Server/Response

The following sub-headings are XML elements for the server's response.

soap:Envelope

This element has three attributes:

soap:Header

This element has only one child:

SequenceAcknowledgment

This element has only one attribute:

This element has two children:

Identifier

This element has only one attribute:

This element's inner text contains the <Identifier> you sent in the request.

AcknowledgmentRange

This element has two attributes:

soap:Body

This element has only one child:

StoreResponse

This element has only one attribute:

This element has only one child:

Examples

Client/Request

POST /OimWS/oim.asmx HTTP/1.1
SOAPAction: https://messenger.msn.com/ws/2004/09/oim/Store
Cache-Control: no-cache
Content-Type: text/xml; charset=utf-8
Content-Length: 1380

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>
	<soap:Header>
		<From
			memberName="example@hotmail.com"
			friendlyName="=?utf-8?B?RXhhbXBsZSBVc2Vy?="
			xml:lang="en-us"
			proxy="MSNMSGR"
			xmlns="http://messenger.msn.com/ws/2004/09/oim/"
			msnpVer="MSNP14"
			buildVer="8.0.0787"
		/> 
		<To memberName="anotheruser@hotmail.com" xmlns="http://messenger.msn.com/ws/2004/09/oim/"/>
		<Ticket
			passport="t=ticket&amp;p=profile"
			appid="PROD0112J1LW7%NB"
			lockkey="7cc3d03d3ca73f49bc47a9d72b839a9c"
			xmlns="http://messenger.msn.com/ws/2004/09/oim/"
		/>
		<Sequence xmlns="http://schemas.xmlsoap.org/ws/2003/03/rm">
			<Identifier xmlns="http://schemas.xmlsoap.org/ws/2002/07/utility">http://messenger.msn.com</Identifier>
			<MessageNumber>1</MessageNumber>
		</Sequence>
	</soap:Header>
	<soap:Body>
		<MessageType xmlns="http://messenger.msn.com/ws/2004/09/oim/">text</MessageType>
		<Content xmlns="http://messenger.msn.com/ws/2004/09/oim/">MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
X-OIM-Message-Type: text
X-OIM-Run-Id: {62554900-7F16-489B-8484-B2C49DA78FD6}
X-OIM-Sequence-Num: 1

VGhpcyBpcyBhIG1lc3NhZ2Uu</Content>
	</soap:Body>
</soap:Envelope>

Server/Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 669

<?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>
		<SequenceAcknowledgment xmlns="http://schemas.xmlsoap.org/ws/2003/03/rm">
			<Identifier xmlns="http://schemas.xmlsoap.org/ws/2002/07/utility">http://messenger.msn.com</Identifier>
			<AcknowledgmentRange Upper="1" Lower="1" />
		</SequenceAcknowledgment>
	</soap:Header>
	<soap:Body>
		<StoreResponse xmlns="http://messenger.msn.com/ws/2004/09/oim/">
			<PointsConsumed>0</PointsConsumed>
		</StoreResponse>
	</soap:Body>
</soap:Envelope>