Back to all docs
leaderboard:submit

Leaderboards

Submit public scores for the current game. Scores are entertainment features and should not be treated as cheat-proof competitive records.

leaderboardscoresubmitScore

submitScore

submitScore writes a numeric score for the current player and game. Round values before submitting, and submit only important scores rather than every frame.

  • Submit final scores, best scores, or milestone scores.
  • Do not submit every tick.
  • Use your own anti-spam logic inside the game UI.
  • The host may reject unavailable or invalid submissions.
Submit a score
const permission = await QubizSDK.requestPermissions(["leaderboard:submit"]);

if (permission.status === "granted") {
  const result = await QubizSDK.submitScore("global", Math.round(score));
  console.log(result.status, result.score);
}