Kongregate Developers

Using an item

This HTTP endpoint allows you to use a limited-use item belonging to a user. You must pass in the id of the item instance to use. This id can be obtained from the user's inventory. It is important to note that this is NOT the same as the item id which is returned from the items action. Calling this action on an unlimited use item will return failure, since that operation is not supported.

Note: This method is to be called from a server only. If, and only if, the game is client-side only with no server, you will need to use our client API call to consume items.

POST url: https://api.kongregate.com/api/use_item.json
Required params:
  • api_key: The api key assigned to your game
  • game_auth_token: The game_auth_token for the user
  • user_id: The user id of the user
  • id: The id (from the user's inventory) of the item instance to use
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
If Successful:
  • remaining_uses: The new amount of remaining uses for the item instance.
  • usage_record_id: The unique id of the usage record for this transaction.

Example: Use a limited-use item

POST https://api.kongregate.com/api/use_item.json
POST data:
  • api_key=MyApiKey
  • game_auth_token=GameAuthToken
  • user_id=765
  • id=101
Example Response:
  "success": true,
  "remaining_uses": 9,
  "usage_record_id": 7653