How do I use an RPS ticket with LiveContacts API?

I've managed to get a ticket via Relying Party Suite, but now I've no idea how to use it. The examples available all use DomainAuthToken.

Here's the example fromWindows Live Data Code sample


That shows how to add it to the headers for DomainAuthToken. Changing that to ReplyPartySuite or RPS or 15 other odd combinations doesn't work at all. In fact I get NO reply from cumulus at ALL. No headers, no data, no errors.

What is happening? What's the proper way to do this? Most of all, why isn't this documented somewhere?

Update: I tried following the documentation here onHTTP 1.1 Headers to no avail as well.

[1421 byte] By [KevinFrancis] at [2008-3-3]
# 1

The short answer is that the HTTP header needed to submit a RPS token looks like:

Code Snippet
Authorization: WLID1.0 t="<RPS Token>"

But be careful, you need to have a compact ticket specifically for Windows Live Data. See http://msdn2.microsoft.com/en-us/library/bb447721.aspx for all the

details including code samples and an example WS-Trust request and response message. The messages have been preset to set things like the

wsa:address value to Windows Live Data's URL.

YaronY.Goland at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Data Development...
# 2
I tried it with that with the same result: the service just ignores me. No output at all. I mean, an error would be nice at this point. At least then I'd know I was getting somewhere.

Any suggestions? Below is the code I'm using (PHP) to do this:

Code Snippet

$ch = curl_init($this->api_url ."/contacts/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: WLID1.0 t="'.$this->GetTicket().'"'));
$response = curl_exec($ch);


Rest assured, the api_url and get ticket parts are correct and the only error returned by cURL is "Empty response from server".
KevinFrancis at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Data Development...
# 3

Hi, Kevin, what does you "GetTicket" call do? Is it from the Windows Live ID SDK or it is some function you wrote yourself which makes a soap call to the WS-Trust service point and get a ticket from that?

YuanYuanYu-MSFT at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Data Development...
# 4

Hey guys.. I've had the exact same problem!!

I'm a VB.Net boy, but the code provided at the above URL for getting an RPS token seemed to work fine.

I changed the HTTP header to the above - zilch!

When I try to make any request to add a contact using my own credentials, it throws a Server 500 error back.

I've attached a console project to demonstrate. http://beta.b2bwebsolutions.com.au/files/WinLiveAuthTicket_Console.zip (VS 2005 solution)

Yes - the code needs MASSIVE clean-up as I've basically munged together a few code examples, but since I can't get any useful communications, I haven't spent much time optimising it.

Any comments or thoughts would be brilliant!

Cheers,

Ben Horan

benny_boi at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Data Development...
# 5
Hi, Benny. Can you manage to retrieve information using RPS authentication? I mean, will a "GET" request succeed?
YuanYuanYu-MSFT at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Data Development...
# 6

Embarrassingly enough,

I sniffed the exact header that was being sent to the cumulus server and there was a missing quotation mark at the end of the RPS ticket. Fixed that, and bingo - all functions worked on my very own MSN account. Have now successfully used POST, PUT, DELETE with exactly the right outcomes.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1728384&SiteID=1 for anyone interested in reading where I got the idea (more on the "WLD1.0 t=" usage there).

Now that I've confirmed it works, I'm in the process of cleaning up the code dramatically, and I'll upload a copy here for anyone else who might benefit (ps: all my work is in VB.Net not C# as most people seem to favour - sorry about that!).

Regards,

Ben

benny_boi at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Data Development...
# 7
Great effort,
YuanYuanYu-MSFT at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Data Development...

Windows Live Developer Forums

Site Classified