Kongregate Developers

Code

This is php example code that demonstrates how to serve a flash game to both facebook and kongregate.

The code demonstrates making server side api calls to kongregate. For example, you can handle payment requests through your server instead of using the in-page javascript api.

KongregatePlatform.php: a php library for making api requests to kongregate

Game-specific Links and Data

In addition to the normal metrics that we provide, like gameplays and ad revenue share, for free games, there are a number of useful links and data feeds that you can access for your virtual goods game. All of these links are different for each game, so we'll use relative links here. If you want to access '/items', you'll go to www.kongregate.com/games/yourName/yourGameName/items.

Items Page

Your Items Page can be found at /items and lets you manage all of the items that you sell within your game. An "item" is a Kongregate term and can refer to a variety of in -game purchases, from actual items to subscriptions to packages of in-game currency. Item prices must be set server-side to prevent player tampering. You can export or import item lists via .csv files if needed.

API / Guest Page

If you browse over to /api, you will find a few pieces of useful information. One is your API key, which will allow you to make secure transactions via our server-side API calls. The other useful info is the guest access key (and link), which can be used to test the guest experience with your game. We recommend having a good landing page as well as a call to our services.showRegistrationBox() function attached to a "Register" button on the page. This will help encourage non-registered users to sign up and start playing your game.

Kred Sales Report

While you can view your overall kreds sales in your account Kred Sales Report page, you can get much more detail by going to /kred_account for any one of your games. At this page, you can see summaries of sales by item, most recent individual sales, and export a custom sales report that includes all sales made over any time period.

Related to, and linked from, the game's kred account page, you can check out /item_usage_records to track usages by individual users in your game, as well as see how many times multi-use items have been used.

Comments