Kongregate Developers

Note: This feature will not function unless we have enabled it for your game. If you would like to have this feature enabled, please contact us.

Server-side Private Messages to Users

This function allows you to send a message to a player through a server-side POST, even if that player is offline. It can be used to let players know about updates, information directly relevant to their game status, or whatever else would make sense. However, please keep the messages relevant and well-targeted. We reserve the right to discontinue access to this API if a game is using it excessively or sending information that is not applicable to the recipient.

The targeted user must have played the game recently (within two weeks), and only one message can be sent per player per day.

POST https://api.kongregate.com/api/private_message

Required params:
  • user_id OR username: User id or username of the target
  • api_key: The api key assigned to your game
  • content: The text content to send to the user. Any HTML will be stripped, though *bold* and _italics_ will be rendered.
Optional params:
  • image_url: URL to an icon to insert into the message
  • success: true if the message was sent successfully, false otherwise

Example Message Send Request

Here is an example of a private message that we want to send to let a player know that their cow isn't going to milk itself.
POST http://www.kongregate.com/api/private_message
POST data:
  • user_id=12345
  • api_key=MyApiKey
  • content=Your cow is ready for milking!
  • image_url=http://lorempixel.com/400/200/
Example Response:
  "success": true