{"_id":"570823d392d1f30e0024b4b9","project":"56abbf55f25f160d00e17f4e","version":{"_id":"56abbf55f25f160d00e17f51","project":"56abbf55f25f160d00e17f4e","__v":12,"createdAt":"2016-01-29T19:36:53.665Z","releaseDate":"2016-01-29T19:36:53.665Z","categories":["56abbf56f25f160d00e17f52","56abca6bf9757e0d007c6650","56acddfa0ab3c00d00ce3332","56af65da9d32e30d0006d30f","56af66cab34d210d003d9ad0","56af6afcd21e9c0d00b628d1","56af6d6ecc4cbd0d00ce2c88","5705b12221cfed0e00e8c580","570a5676ade45d0e00c1ad33","570d7d25d1e4b82000d9e385","570eac3c3160d10e0041df0e","575709000fd6a3200010dded"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":0,"editedParams":true,"user":"56abbec30b9e0b0d00616274","category":{"_id":"5705b12221cfed0e00e8c580","project":"56abbf55f25f160d00e17f4e","__v":0,"version":"56abbf55f25f160d00e17f51","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-04-07T01:00:18.230Z","from_sync":false,"order":4,"slug":"server-side-api","title":"Server Side API"},"parentDoc":null,"editedParams2":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-04-08T21:34:11.054Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"Request User Items","code":"{\n \"success\": true,\n \"items\": [\n {\n \"id\": 100,\n \"identifier\": \"sharp-sword\",\n \"name\": \"Sharp Sword\",\n \"description\": \"A sharp sword\",\n \"remaining_uses\": null,\n \"data\": null\n },\n {\n \"id\": 101,\n \"identifier\": \"potion\",\n \"name\": \"Potion\",\n \"description\": \"A Healing Potion\",\n \"remaining_uses\": 10,\n \"data\": null\n }\n ]\n}","language":"json","status":200}]},"settings":"5707e879cfc0992200c2a419","examples":{"codes":[{"code":"curl -XGET 'https://api.kongregate.com/api/user_items.json?api_key=GAMEAPIKEY&user_id=1'","language":"curl","name":"Request User Items"}]},"method":"get","auth":"required","params":[{"_id":"570823d392d1f30e0024b4bb","ref":"","in":"query","required":true,"desc":"Your private API key","default":"","type":"string","name":"api_key"},{"_id":"570823d392d1f30e0024b4ba","ref":"","in":"query","required":false,"desc":"Kongregate User ID of the user you wish to retrieve items for","default":"","type":"int","name":"user_id"}],"url":"/user_items.json"},"isReference":true,"order":10,"body":"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.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Note\",\n \"body\": \"This call should only be made from a server. To retrieve a user's items from your client, see the [requestUserItemList](doc:client-api-mtx-requestuseritemlist) method.\"\n}\n[/block]","excerpt":"Retrieve a user's inventory","slug":"server-api-user-items","type":"endpoint","title":"Items - User"}
getItems - User
Retrieve a user's inventory
Definition
{{ api_url }}{{ page_api_url }}
Parameters
Query Params
api_key:
required
string
Your private API key
user_id:
integer
Kongregate User ID of the user you wish to retrieve items for