Get Started

Easy ways to get started using the Xbox Live API

Setting up the XboxLiveAPI is fairly easy. Keep reading below to see how!

Setting up the API will require a bit of PHP and server knowledge. It is recommended to use a VPS solution such as Linode to host the API.

  1. Download the XboxLiveAPI Package.
  2. Make sure your server meets the minimum requirements.
  3. Edit /includes/bootloader.php to add 3 or more Xbox Live accounts to scrape the data. Make sure these accounts have NOT played any games on Xbox Live, or the results can be returned incorrectly.

In order to make sure your server meets the necessary requirements, you may have to install a few different libraries and modules. This will guide you through making sure that your server is up to snuff. Please note that I will be giving commands based on an Ubuntu environment.

Make sure all current applications are up to date. Hopefully, you will already have PHP 5.4 or higher and Apache 2.2.3 installed. Execute the following commands to make sure they're up-to-date.
sudo apt-get update
sudo apt-get upgrade

Here we will install our cURL module. JSON should already exist on a default PHP 5.4 or higher install.
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

Now, we will install APC. The API allows for other caching engines like XCache and Memcached, but I prefer APC, and will show you how to install it. To install the others, you can run a simple Google search.
sudo apt-get install php-apc

We're almost done! We just have to make sure our three Apache modules are installed, and we can move on.
sudo a2enmod rewrite
sudo a2enmod header
sudo a2enmod expires

That's it for setting up the server! Now, lets move on to getting the API set up so we can start getting that ever elusive Xbox Live data!

Once you have set up the server, you can now upload the API files. Dowload the repository and upload it to the directory in which you want the API served from. Make sure that the following directories are CHMOD to 777:

/includes/logs
/includes/cookies

Then, simply add the login details to at least 3 different Xbox LIVE accounts to /includes/bootstrap.php and you can start accessing Xbox LIVE data!

In order to use the API on your own server, it must meet these minimum requirements:

  1. PHP 5.4+
    • cURL
    • JSON
  2. Apache 2.2+
    • mod_rewrite
    • mod_header
    • mod_expires
  3. Caching Engine
    • APC
    • XCache
    • Memcached

If you're having trouble with XboxLiveAPI, make sure to check out the issues page.