Documentation

Xbox One API

Looking for some example support code? Check out the GitHub Project — https://github.com/xboxapi/

Using the API coudn't be simpler. The difference with our new API is that it requires Xbox LIVE authentication to get the data using your Xbox account. This means YOUR friends that have their privacy settings set to friends only can be seen by the API. It also means that we can get your exact data from the API.

Authentication

To connect to the API we need an Authentication header. This is sent as X-AUTH

An example of this is below. Note that if you're logged in we will display your API Key. This means you can copy it straight into your terminal

curl -s -H "X-AUTH: YOUR_AUTH_KEY_HERE" https://xboxapi.com/v2/accountxuid

Rate Limiting

XboxAPI requests are limited on a per API Key basis.

When making a request to the API, your limit information will be returned in the headers. Below is an example of this; (If your logged in while viewing this, these are your live stats.)

curl -i -H "X-AUTH: YOUR_AUTH_KEY_HERE" https://xboxapi.com/v2/accountxuid


HTTP/1.1 200 OK
Date: Tue, 1 September 2015 10:16:33 UTC

Cache-Control: no-cache
Access-Control-Allow-Origin: *
Content-Type: application/json
X-RateLimit-Limit: 0
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 2607

{"xuid":2533274813081462,"gamerTag":"djekl","gamertag":"djekl"}

Requesting data in a different language

The API has a default language of en-GB. If you wish to change this to your locale then simply send the correct language header for you using Accept-Language.

For example, if we wanted a users games in German (de-DE), we would send the following request.

curl -s -H "X-AUTH: YOUR_AUTH_KEY_HERE" -H "Accept-Language: de-DE" https://xboxapi.com/v2/2533274813081462/xboxonegames

Your current language header (sent via your browser) is en-US.


Sending Messages

The message sending has been built into the api since the very start, however due to spam I initially had this locked to a few whitelisted users. I am happy to finally document this and allow all users to find out how to send messages, as promoted on the homepage.

Note:

Abuse of the messaging endpoint of the API will result in a perminant ban of your account, and xbox live email address on this system. Any users caught sending spam messages will not be given warning before a ban.

An example of this can be done by sending the following JSON POST data.

{
    "to": [
        "2533274813081462"
    ],
    "message": "This is an example message sent via XboxAPI 😃"
}

With the following headers:

  • X-Auth: YOUR_AUTH_KEY_HERE
  • Content-Type: application/json

To the following endpoint: https://xboxapi.com/v2/messages

This will send me (djekl) a test message.


Available Endpoints

Below you will find a list of available endpoints with some example links too. If you're logged in you can click on them and see the response data available.

# Endpoint Name Short Description
0 /v2/accountXuid Account XUID This is your account XUID (Xbox Account User ID)
1 /v2/messages Account Messages These are your message with full preview…
2 /v2/conversations Account Conversations These are your conversations with full preview of the last message sent/recieved…
3 /v2/xuid/{gamertag} Gamertag XUID This is the XUID for a specified Gamertag (Xbox Account User ID)
4 /v2/gamertag/{xuid} XUID Gamertag This is the Gamertag for a specified XUID (Xbox Account User ID)
5 /v2/{xuid}/profile Profile This is the Profile for a specified XUID
6 /v2/{xuid}/gamercard Gamercard This is the Gamercard information for a specified XUID
7 /v2/{xuid}/presence Presence This is the current presence information for a specified XUID
8 /v2/{xuid}/activity Activity This is the current activity information for a specified XUID
9 /v2/{xuid}/activity/recent Recent Activity This is the recent activity information for a specified XUID
10 /v2/{xuid}/friends Friends This is the friends information for a specified XUID
11 /v2/{xuid}/followers Followers This is the followers information for a specified XUID
12 /v2/recent-players Recent Players This is accounts recent players information
13 /v2/{xuid}/game-clips Users Game Clips This is the game clips for a specified XUID
14 /v2/{xuid}/game-clips/saved Users Saved Game Clips This is the saved game clips for a specified XUID
15 /v2/{xuid}/game-clips/{titleId} Users Game Clips For Specified Game This is the saved game clips for a specified XUID, and Game (titleId)
16 /v2/game-clips/{titleId} Game Clips For Specified Game This is the saved game clips for a specified Game (titleId)
17 /v2/{xuid}/screenshots Users Screenshots This is the screenshots for a specified XUID
18 /v2/{xuid}/screenshots/{titleId} Users Screenshots For Specified Game This is the saved screenshots for a specified XUID, and Game (titleId)
19 /v2/screenshots/{titleId} Screenshots For Specified Game This is the saved screenshots for a specified Game (titleId)
20 /v2/{xuid}/game-stats/{titleId} Game Stats This is the game stats for a specified XUID, on a specified game. (i.e. Driver Level on Forza etc.)
21 /v2/{xuid}/xbox360games Xbox 360 Games This is the Xbox 360 Games List for a specified XUID
22 /v2/{xuid}/xboxonegames Xbox ONE Games This is the Xbox One Games List for a specified XUID
23 /v2/{xuid}/achievements/{titleId} Xbox Game Achievements This is the Xbox Games Achievements for a specified XUID
24 /v2/game-details/{product_id} Xbox Game Information (Product ID) This is the Xbox Game Information (using the product id)
25 /v2/game-details-hex/{game_id} Xbox Game Information (Game ID in HEX) This is the Xbox Game Information (using the game id in hex format)
26 /v2/latest-xbox360-games Latest Xbox 360 Games This gets the latest Xbox 360 Games from the Xbox LIVE marketplace
27 /v2/latest-xboxone-games Latest Xbox One Games This gets the latest Xbox One Games from the Xbox LIVE marketplace
28 /v2/latest-xboxone-apps Latest Xbox One Apps This gets the latest Xbox One Apps from the Xbox LIVE marketplace