Console
Guide

CloudStore

Per-user JSON cloud storage — perfect for game saves, settings, and inventory. Data is isolated by AppID + cloudkey per user.

Overview

EndpointAction
POST /api/cloudstore/set.phpSave or overwrite a JSON value
POST /api/cloudstore/get.phpRetrieve one key or all keys
POST /api/cloudstore/delete.phpDelete a key
CloudStore vs Database: CloudStore data is per-user — each user has their own isolated storage. The Database is per-app (shared across all users).

1. Save data

Call POST /api/cloudstore/set.php with a cloudkey and any JSON value as dataobject. If the key already exists it is overwritten completely.

await fetch('https://vaneltonmedia.com/api/cloudstore/set.php', {
  method: 'POST',
  headers: {
    'Authorization': `${APP_ID}:${APP_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    token: localStorage.getItem('vm_token'),
    cloudkey: 'save-slot-1',
    dataobject: { level: 15, score: 4800, inventory: ['sword', 'shield'] }
  })
});
interface CloudSetBody {
  token: string;
  cloudkey: string;
  dataobject: unknown;
}

async function cloudSet(cloudkey: string, data: unknown): Promise {
  await fetch('https://vaneltonmedia.com/api/cloudstore/set.php', {
    method: 'POST',
    headers: { 'Authorization': `${APP_ID}:${APP_KEY}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ token: localStorage.getItem('vm_token'), cloudkey, dataobject: data })
  });
}

await cloudSet('save-slot-1', { level: 15, score: 4800 });
function cloudSet(string $cloudkey, mixed $data): array {
    $ch = curl_init('https://vaneltonmedia.com/api/cloudstore/set.php');
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: ' . APP_ID . ':' . APP_KEY,
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => json_encode([
            'token'      => $_SESSION['vm_token'],
            'cloudkey'   => $cloudkey,
            'dataobject' => $data,
        ]),
    ]);
    $result = json_decode(curl_exec($ch), true);
    curl_close($ch);
    return $result;
}

cloudSet('save-slot-1', ['level' => 15, 'score' => 4800]);
import requests

def cloud_set(token, cloudkey, data):
    return requests.post(
        'https://vaneltonmedia.com/api/cloudstore/set.php',
        headers={'Authorization': f'{APP_ID}:{APP_KEY}', 'Content-Type': 'application/json'},
        json={'token': token, 'cloudkey': cloudkey, 'dataobject': data}
    ).json()

cloud_set(token, 'save-slot-1', {'level': 15, 'score': 4800})
var _headers = ds_map_create();
ds_map_add(_headers, "Authorization", global.app_id + ":" + global.app_key);
ds_map_add(_headers, "Content-Type",  "application/json");

http_request(
    "https://vaneltonmedia.com/api/cloudstore/set.php",
    "POST", _headers,
    json_stringify({
        token:      global.user_token,
        cloudkey:   "save-slot-1",
        dataobject: { level: 15, score: 4800 }
    })
);
ds_map_destroy(_headers);
APP_ID="com.myapp.game"
APP_KEY="MyAppKey1234567890ABCDE"
TOKEN="YOUR_SESSION_TOKEN"

curl -s -X POST "https://vaneltonmedia.com/api/cloudstore/set.php" \
  -H "Authorization: $APP_ID:$APP_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"token\":\"$TOKEN\",\"cloudkey\":\"save-slot-1\",\"dataobject\":{\"level\":15,\"score\":4800}}"
using System.Net.Http;
using System.Text;
using System.Text.Json;

const string APP_ID  = "com.myapp.game";
const string APP_KEY = "MyAppKey1234567890ABCDE";

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", $"{APP_ID}:{APP_KEY}");

var payload = JsonSerializer.Serialize(new {
    token      = token,
    cloudkey   = "save-slot-1",
    dataobject = new { level = 15, score = 4800 }
});
using var res = await client.PostAsync(
    "https://vaneltonmedia.com/api/cloudstore/set.php",
    new StringContent(payload, Encoding.UTF8, "application/json"));

using var doc = JsonDocument.Parse(await res.Content.ReadAsStringAsync());
bool success = doc.RootElement.GetProperty("success").GetBoolean();
-- Requires: luarocks install luasocket luasec lua-cjson
local http  = require("socket.http")
local ltn12 = require("ltn12")
local json  = require("cjson")

local APP_ID  = "com.myapp.game"
local APP_KEY = "MyAppKey1234567890ABCDE"

local body   = json.encode({
    token      = token,
    cloudkey   = "save-slot-1",
    dataobject = { level = 15, score = 4800 },
})
local chunks = {}
http.request {
    url    = "https://vaneltonmedia.com/api/cloudstore/set.php",
    method = "POST",
    headers = {
        ["Authorization"]  = APP_ID .. ":" .. APP_KEY,
        ["Content-Type"]   = "application/json",
        ["Content-Length"] = #body,
    },
    source = ltn12.source.string(body),
    sink   = ltn12.sink.table(chunks),
}
local result = json.decode(table.concat(chunks))
print(result.success) -- true

Success response:

{ "success": true, "message": "Cloud data saved successfully.", "cloudkey": "save-slot-1" }

2. Load data

Call POST /api/cloudstore/get.php. Omit cloudkey to fetch all keys for this user + app.

// Load a specific key
const res = await fetch('https://vaneltonmedia.com/api/cloudstore/get.php', {
  method: 'POST',
  headers: { 'Authorization': `${APP_ID}:${APP_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ token: localStorage.getItem('vm_token'), cloudkey: 'save-slot-1' })
});
const { dataobject } = await res.json();
console.log(dataobject.level); // 15

// Load ALL keys
const allRes = await fetch('https://vaneltonmedia.com/api/cloudstore/get.php', {
  method: 'POST',
  headers: { 'Authorization': `${APP_ID}:${APP_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ token: localStorage.getItem('vm_token') })
});
const { data, count } = await allRes.json();
// data = [{ cloudkey: 'save-slot-1', dataobject: {...} }, ...]
async function cloudGet(cloudkey: string): Promise {
  const res = await fetch('https://vaneltonmedia.com/api/cloudstore/get.php', {
    method: 'POST',
    headers: { 'Authorization': `${APP_ID}:${APP_KEY}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ token: localStorage.getItem('vm_token'), cloudkey })
  });
  const { dataobject } = await res.json();
  return dataobject as T;
}

const save = await cloudGet<{ level: number; score: number }>('save-slot-1');
function cloudGet(string $cloudkey): mixed {
    $ch = curl_init('https://vaneltonmedia.com/api/cloudstore/get.php');
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_HTTPHEADER => ['Authorization: ' . APP_ID . ':' . APP_KEY, 'Content-Type: application/json'],
        CURLOPT_POSTFIELDS => json_encode(['token' => $_SESSION['vm_token'], 'cloudkey' => $cloudkey]),
    ]);
    $result = json_decode(curl_exec($ch), true);
    curl_close($ch);
    return $result['dataobject'] ?? null;
}

$save = cloudGet('save-slot-1');
def cloud_get(token, cloudkey=None):
    body = {'token': token}
    if cloudkey:
        body['cloudkey'] = cloudkey
    return requests.post(
        'https://vaneltonmedia.com/api/cloudstore/get.php',
        headers={'Authorization': f'{APP_ID}:{APP_KEY}', 'Content-Type': 'application/json'},
        json=body
    ).json()

save = cloud_get(token, 'save-slot-1')['dataobject']
var _headers = ds_map_create();
ds_map_add(_headers, "Authorization", global.app_id + ":" + global.app_key);
ds_map_add(_headers, "Content-Type",  "application/json");

global.load_req = http_request(
    "https://vaneltonmedia.com/api/cloudstore/get.php",
    "POST", _headers,
    json_stringify({ token: global.user_token, cloudkey: "save-slot-1" })
);
ds_map_destroy(_headers);

// --- In Async HTTP Event ---
if (async_load[? "id"] == global.load_req) {
    var _d = json_parse(async_load[? "result"]);
    var _save = _d.dataobject;
    show_debug_message("Level: " + string(_save.level));
}
TOKEN="YOUR_SESSION_TOKEN"

# Load a specific key
curl -s -X POST "https://vaneltonmedia.com/api/cloudstore/get.php" \
  -H "Authorization: $APP_ID:$APP_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"token\":\"$TOKEN\",\"cloudkey\":\"save-slot-1\"}"

# Load ALL keys (omit cloudkey)
curl -s -X POST "https://vaneltonmedia.com/api/cloudstore/get.php" \
  -H "Authorization: $APP_ID:$APP_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"token\":\"$TOKEN\"}"
async Task CloudGet(string cloudkey)
{
    var payload = JsonSerializer.Serialize(new { token, cloudkey });
    using var res = await client.PostAsync(
        "https://vaneltonmedia.com/api/cloudstore/get.php",
        new StringContent(payload, Encoding.UTF8, "application/json"));

    using var doc = JsonDocument.Parse(await res.Content.ReadAsStringAsync());
    return doc.RootElement.GetProperty("dataobject").Clone();
}

var save = await CloudGet("save-slot-1");
local function cloud_get(tok, cloudkey)
    local body   = json.encode({ token = tok, cloudkey = cloudkey })
    local chunks = {}
    http.request {
        url    = "https://vaneltonmedia.com/api/cloudstore/get.php",
        method = "POST",
        headers = {
            ["Authorization"]  = APP_ID .. ":" .. APP_KEY,
            ["Content-Type"]   = "application/json",
            ["Content-Length"] = #body,
        },
        source = ltn12.source.string(body),
        sink   = ltn12.sink.table(chunks),
    }
    return json.decode(table.concat(chunks)).dataobject
end

local save = cloud_get(token, "save-slot-1")
print(save.level) -- 15

3. Delete data

await fetch('https://vaneltonmedia.com/api/cloudstore/delete.php', {
  method: 'POST',
  headers: { 'Authorization': `${APP_ID}:${APP_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ token: localStorage.getItem('vm_token'), cloudkey: 'save-slot-1' })
});
await fetch('https://vaneltonmedia.com/api/cloudstore/delete.php', {
  method: 'POST',
  headers: { 'Authorization': `${APP_ID}:${APP_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ token: localStorage.getItem('vm_token'), cloudkey: 'save-slot-1' })
});
$ch = curl_init('https://vaneltonmedia.com/api/cloudstore/delete.php');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['Authorization: ' . APP_ID . ':' . APP_KEY, 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode(['token' => $_SESSION['vm_token'], 'cloudkey' => 'save-slot-1']),
]);
curl_exec($ch);
curl_close($ch);
requests.post(
    'https://vaneltonmedia.com/api/cloudstore/delete.php',
    headers={'Authorization': f'{APP_ID}:{APP_KEY}', 'Content-Type': 'application/json'},
    json={'token': token, 'cloudkey': 'save-slot-1'}
)
var _headers = ds_map_create();
ds_map_add(_headers, "Authorization", global.app_id + ":" + global.app_key);
ds_map_add(_headers, "Content-Type",  "application/json");

http_request(
    "https://vaneltonmedia.com/api/cloudstore/delete.php",
    "POST", _headers,
    json_stringify({ token: global.user_token, cloudkey: "save-slot-1" })
);
ds_map_destroy(_headers);
TOKEN="YOUR_SESSION_TOKEN"

curl -s -X POST "https://vaneltonmedia.com/api/cloudstore/delete.php" \
  -H "Authorization: $APP_ID:$APP_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"token\":\"$TOKEN\",\"cloudkey\":\"save-slot-1\"}"
var payload = JsonSerializer.Serialize(new { token, cloudkey = "save-slot-1" });
using var res = await client.PostAsync(
    "https://vaneltonmedia.com/api/cloudstore/delete.php",
    new StringContent(payload, Encoding.UTF8, "application/json"));
local body   = json.encode({ token = token, cloudkey = "save-slot-1" })
local chunks = {}
http.request {
    url    = "https://vaneltonmedia.com/api/cloudstore/delete.php",
    method = "POST",
    headers = {
        ["Authorization"]  = APP_ID .. ":" .. APP_KEY,
        ["Content-Type"]   = "application/json",
        ["Content-Length"] = #body,
    },
    source = ltn12.source.string(body),
    sink   = ltn12.sink.table(chunks),
}

Error reference

CodeMessageCause
401Invalid or expired token.Bad or missing user token
404Data not found for the specified cloudkey.Key doesn't exist for this user + app