Save your player’s game data so they can play from any publishers website. The user data API requires a login before data can be saved. Players can access only their own data.

WARNING: Save should be used as sparingly as possible. Try to reduce both size and amount of user data submissions. Some tips how to make it more efficient:

  • Save as minimal amount of data as possible, only what is required to load the game.
  • If your save data is bigger than several kilobytes, consider using some compression.
  • Save after significant events, like reaching new level, gaining an achievement or unlocking some award.
  • Avoid auto-saving using a timer. If you have no other choice, do it no more than once a minute.
  • Try to not exceed 30Kb. There is some headroom, but larger saves may get rejected by API.
  • If you manage to keep your saves below 1Kb, you are awesome.

Addresses

POST: "https://account.y8.com/api/v1/json/user_data/submit"
POST: "https://account.y8.com/api/v1/json/user_data/remove"
POST: "https://account.y8.com/api/v1/json/user_data/retrieve"

Parameters

Each user data call should have an access_token or header Autherization included. Additionally, each call will include a key field. The key is used to store more than one set of data. Although it’s possible to save many small sets of data, we recommend combining data into a large group to minimize overhead of making many calls.

The submit call will also include a value field. The value field is the data you want to store on behalf of the user. The data can be in any format but json is perferred as it has become universal. Remeber to encode and decode data as needed depending on how it is transmitted.

Like most of our APIs, either application/json or the default HTML form application/x-www-form-urlencoded mime-types will be accepted. The default character encoding is UTF-8, so use client side encoding/decoding if you have problems with special characters.