Creating game credentials

You can add game credentials in your MongoDB database in the 'games' collection. The collection will be created for you automatically the first time you upload to Heroku or when your app starts.

If you have used Heroku then you can access the Compose.io dashboard through the Heroku dashboard.

{
    publickey: "mypublickey",
    privatekey: "myprivatekey",
    leaderboards: true,
    playerlevels: true,
    gamevars: true,
    geoip: true
}

To limit access to the API server you can set the above properties to false.

Newsletters

If you want to use the in-game newsletter subscriptions you'll have to do a few things to set up. We're using MailChimp in our API server so:

  1. Create your account, it's free for up to 2,000 subscribers and 12,000 emails per month after which you can either pay monthly or only when you want to send newsletters
  2. Create a List and take note of the List ID, you can access it in the list's settings
  3. Define any custom fields, called MERGE TAGS, that you want to collect such as the api, the game version, the date the player first played in the "List fields and |MERGE| tags" section
  4. Create an API key in your account settings

Once you've done all of that you need to configure the server with your data:

heroku config:set mailchimp=your_api_key mailchimp_listid=your_list_id

You can also disable the default double opt-in requirement that emails players a confirmation before subscribing them by:

heroku config:set mailchimp_doubleoptin=false

By default if a player subscribes 2x their information will update but if you would like to prevent that:

heroku config:set mailchimp_allowupdates=false