Kongregate Developers

/characters.json

POST https://api.kongregate.com/api/characters.json
Required params:
  • api_key: The api key assigned to your game
  • server_identifier: How you identify your server (unique)
  • server_name: How users identify what server they are playing on
  • character_identifier: What you use to identify a user in the game (unique to server)
  • character_name: User's in game name
  • guild_identifier: How you map guilds on your server (unique to server)
  • guild_name: The guild name that users see
Optional params:
  • user_id: The Kongregate user id associated with the character
  • guild_admin_level: You can set the user as either a superadmin or just an admin. Submitting this field as an empty string or not submitting it makes them just a regular guild member.
response if successful:
  • guild_identifier: the guild identifier that was submitted
  • server_identifier: the server identifier that was submitted
  • success: true if it was successful
  • user_id: the user's Kongregate user_id
  • character_identifier: the identifier that was submitted

Adding a Character to a Guild

Adding a player's character to a guild is handled by a call to /characters.json. In the case that a character is added to a guild that has not been created yet, this call will have the side effect of creating that guild.

There are three types of guild members:

Example: Adding Batman as a superadmin to the guild JusticeLeague will use these parameters

POST URL: https://api.kongregate.com/api/characters.json
POST data:
  • api_key=GAMEAPIKEY
  • user_id=426367
  • server_identifier=101
  • server_name=Gotham01
  • character_identifier=12582
  • character_name=Batman
  • guild_identifier=234
  • guild_name=JusticeLeague
  • guild_admin_level=superadmin

And the call would look like this:

https://www.kongregate.com/api/characters.json?api_key=GAMEAPIKEY&user_id=426367&server_identifier=101&server_name=Gotham01&character_identifier=12582&character_name=Batman&guild_identifier=234&guild_name=JusticeLeague&guild_admin_level=superadmin

Removing a Character from a Guild

In the case that a user leaves a guild, or is booted from one, that user should no longer have access to guild specific forums or chat. The call to remove a character is almost identical to the call to add a character, except the guild_identifier and guild_name shouldn't be submitted at all (or alternatively submitted as empty strings). Removing a character from their guild uses the following parameters

POST URL: https://www.kongregate.com/api/characters.json
POST data:
  • api_key=GAMEAPIKEY
  • user_id=426367
  • server_identifier=101
  • server_name=Gotham01
  • character_identifier=12582
  • character_name=Batman

This will update the character's information with all of the guild information as empty, which removes that player's character from the guild. The call would look like this

https://api.kongregate.com/api/characters.json?api_key=GAMEAPIKEY&user_id=426367&server_identifier=101&server_name=Gotham01&character_identifier=12582&character_name=Batman

Revoking a Character's Superadmin or Admin Status

You can revoke a user's Superadmin or Admin status similarly with a call that resubmits the all of the character's guild parameters the same, except without a designation for admin level. If instead of removing Batman from the guild JusticeLeague, I wanted to demote him to a regular member, these would be the parameters

POST URL: https://api.kongregate.com/api/characters.json
POST data:
  • api_key=GAMEAPIKEY
  • user_id=426367
  • server_identifier=101
  • server_name=Gotham01
  • character_identifier=12582
  • character_name=Batman
  • guild_identifier=234
  • guild_name=JusticeLeague

And the call would look like this:

https://api.kongregate.com/api/characters.json?api_key=GAMEAPIKEY&user_id=426367&server_identifier=101&server_name=Gotham01&character_identifier=12582&character_name=Batman&guild_identifier=234&guild_name=JusticeLeague

Comments