My twitter app uses a web service hosted on my site to get all the necessary Xbox Live info…. way more than the twitter app actually uses. This is a SOAP API, located here:
http://duncanmackenzie.net/services/XboxInfo.asmx
I know that some people prefer a more RESTful API though, so I also have another ‘page’ that you can call with a straight GET request and just pass the gamertag in as a query string parameter:
http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag=Festive+Turkey
Enjoy!
thanx….
Just wondering where you are getting your XBOX Live data from?
Would you consider releasing the code for this? I am currently developing an Xbox live web service and am very interested in your work. You don’t appear to have a contact email address on this site, so perhaps you could get in touch with me through my website?
Thanks Duncan, once again you save me a couple hours of work.
I’m also curious if the data is coming from a public source.
im also working on an Xbox live web service and was wondering if you were going to realased the source code for the one with the GET peramater as i cant find anything like it on the net this is unique!
Ditto to what everyone above said. Would love to know the code to retrieve this information myself as I wouldn’t want to use up your bandwidth for my own script usage.
Thanks a lot…
I think the API will suit my purpose of use perfectly ๐
Hi Duncan,
Awesome work! but like many here I’m VERY interested in how you did that webservice.
I run a community site for Xbox users in Iceland and I’m working on a custom list of all the players here, what they are playing etc.
Since I dont want to hammer your webservice with ~600 calls every 30-60 minutes every day, can you give any inforomation on how you wrote that webservice?
I applied to the Xbox Community Developer program, but never got a reply ๐
Best regards,
Sigurdur G. Gunnarsson
– Iceland / http://www.xbox360.is
Is the API down? I was using it on a test I was doing and now I can not get it. XML call keeps telling me the doc is empty and I only added a cache method to the script?
This service is great – though it’s a shame that MS has decided to limit who has access to the APIs for Xbox Live.
Any chance that the server you connect to has the ability to get achievement info for a specified Gamertag? I’ve already written a small script to update Twitter with my Live status, but I’d also like to build something that can update based on Achievements that I earn.
The time stamp for the last seen, is it PST? I see a -6:00 which makes me think that it is for central time.
Just wanted to say thanks for providing these services!
This service is great! I’ve cooked up a nice little mod for Invision Power Board 2.3.x. It fits right into the user profile page for a nice list of games played, achievements and online status. It wouldn’t be possible without your link to XBL. Thanks!
superb service i made a little friends list for my clan so we can see whos on and whos playing what
wouldnt be possible without your nice service
now i wanna work out how people can see when players unlock achievements and report it so i can get it to make a “10 recent achievement list”
Duncan, great post and info. I’ve been trying for a while to find something like this!
One problem I have though…? I have consumed your webservice in VS2005 and I am trying to get back data for my GTag, but, I keep getting error: Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource.
I’d prefer to use the web service rather than a get method as it’s cleaner. Any help greatly appriciated. Ta.
Tony
I think this is the kind of program Ive been looking for. I am not sure since I know nothing of coding and/or how to use it. If you would be so kind as to maybe email me or even on this board let me know how to use this code, I would really appreciate it. Thanks.
the easiest way to use the info is to use a xml parser and then use the info as you wish
this is how i decided to use it
http://brownmurder.10gbfreehost.com/
i also made a gamertag learderboard and keep meaning to start a new project
hope that help you on how to use the info
Hey I was wondering if anyone could help me retrieve induvidual items of data from the XML Document using PHP.
I have so far:
<?php
$xmlDoc = new DOMDocument();
$xmlDoc->load(“http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag=x2i4eva”]);
$x = $xmlDoc->documentElement;
foreach ($x->childNodes AS $item) {
print $item->nodeName . ” = ” . $item->nodeValue . “
“;
}
?>
Sorry for double post but the code i gave above has a ] after the gamertag that shouldnt be there.
Dan,
I use CURL to first cache the xml file on my own server then simplexml to access the xml file and process it into the PHP script.
Example:
if (file_exists($file)) {
$xml = simplexml_load_file($file);
foreach ($xml->RecentGames->XboxUserGameInfo as $games)
{
print ‘<br>’;
print ‘<b>’ . $games->Game->Name . ‘</b><br> <br>’;
print ‘Achievements: ‘ . $games->Achievements . ‘ of ‘ . $games->Game->TotalAchievements . ‘ possible.<br> <br>’;
print ‘Gamer Score: ‘ . $games->GamerScore . ‘ of ‘ . $games->Game->TotalGamerScore . ‘ possible.<br>’;
}
} else {
exit(‘Failed to open XML file.’);
}
I use this ColdFusion code to cache the xml file on my server. I then setup my server to automatically run this script every 30 minutes. I then have another page that actually uses the local xml file.
<cfhttp url=”http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag=stolemygamertag” method=”get”>
<cfhttpparam type=”header” name=”Accept-Encoding” value=”*” />
<cfhttpparam type=”Header” name=”TE” value=”deflate;q=0″>
</cfhttp>
<cfset gamerinfo = XMLParse(trim(cfhttp.FileContent))>
<cffile action=”write” file=”D:\Inetpub\razorrifh\gamerinfo\stolemygamertag.xml” output=”
Thanks for the resource! I’ve integrated it with my personal site to show my gamer points on the last few games I’ve played. I use CSS to create bar charts of my progress.
http://www.joshnichols.com/xbox/
Hello Duncan,
Thank you for posting this great info! I guess I have the same questions as some of the people on this blog. Is it possible for you to tell me where you’re getting your data from Xbox Live?
I am working on a website and don’t want to bog down your server with hundreds of request every hour. Thanks!
Hi Duncan
Thanx for the API.
This is surely something i was looking for!
After about a day of trying to understand all this. I think I have a pretty good solution to simply displaying your Gamertag status. I have been searching for a way to accomplish this for such a long time. I'm so glad you have shown us the light Duncan!
Also, big thanks to AnimuX for his code. It was a big help.
Check out my implementation out here: http://michaelwschultz.com
I have also written an article about how this is accomplished and have included all the source code here: http://idzr.org/e6swzs
If you all have any questions feel free to contact me at michael@michaelwschultz.com
This service is pretty cool… is the source available?
Hi there, this seems pretty cool… However, could you provide the sourcecode for this?
I just want to know how you get all the information from, and how you do it?
This seems to have stopped working. Using the REST api it just says everyone is an invalid gamertag. This is a great service and it would be a shame if it wasn't saved : )
Duncan, is this completely not available any longer? I’m getting an IIS 404 when I try the links above, and based on the link that brought me here, it appears you switched to an MVC-based Web app at some point.
Did the URL just change, or is it gone-gone?