Request User Items

This HTTP endpoint allows you to request the list of items that belong to a user. These are referred to as item instances. Item instances will only be returned by this method if they have remaining uses, or are unlimited-use items. This should be done after receiving a callback or successful transaction event, as well as each time the game loads in order to check for un-credited items in the inventory.

GET url: http://www.kongregate.com/api/user_items.json
required params:
  api_key: The api key assigned to your game
  user_id: The user_id of the user to request items for

response fields:
  success: true/false depending on if the request was successful
  error: error code integer, if any
  error_description: error code description string, if any

only if successful:
  items: An array of item instance objects-
    id: Unique integer id for the owned item instance
    identifier: String identifier for the item
    name: Name of the item
    description: Description of the item
    remaining_uses: The number of remaining uses for this item, or null for unlimited
    data: The optional string of metadata you attached to the instance at checkout time

Example: Request all items for a user

GET http://www.kongregate.com/api/user_items.json?api_key=MyApiKey&user_id=765

{success:true, 
 items:[
  {id:100,identifier:"sharp-sword",name:"Sharp Sword",
    description:"A sharp sword",remaining_uses:null,data:null},
  {id:101,identifier:"potion",name:"Potion",
    description:"A Healing Potion",remaining_uses:10,data:null},
 ]}

Comments