Build on ubumy
One ubumy account works everywhere. With the ubumy SDK your app can sign members in and share their username, name, picture and score — XP, level, day streak and stars — with the ubumy app and the website.
Two ways to connect
- Member session — a person signs in to your app. Your app can read and save their own profile and score, friends and leaderboards.
- Connected app — your server reads public profiles and the leaderboard with an API key. Read only, and never shipped inside an app.
Members decide: with sharing switched off in their settings they are not visible to other apps or in leaderboards.
JavaScript / TypeScript
import { Ubumy } from '@ubumy/sdk'
const ubumy = new Ubumy({ baseUrl: 'https://ubumy.netlify.app' })
await ubumy.login(email, password)
const me = await ubumy.me() // username, displayName, score, plan
await ubumy.saveScore({ xp: 140, level: 3, streak: 5, totalStars: 11 })
const top = await ubumy.leaderboard({ limit: 10 })Dart / Flutter
import 'package:ubumy_sdk/ubumy_sdk.dart'; final ubumy = Ubumy(baseUrl: 'https://ubumy.netlify.app'); final me = await ubumy.login(email, password); await ubumy.saveScore(const Score(xp: 140, level: 3, streak: 5, totalStars: 11));
Server to server
curl https://ubumy.netlify.app/api/sdk/leaderboard?limit=10 \ -H "Authorization: apps API-Key $UBUMY_API_KEY"
Endpoints
| Request | Who | What |
|---|---|---|
GET /api/sdk/me | member | Your profile, score and plan |
PATCH /api/sdk/me | member | Change username, display name or sharing |
GET /api/sdk/profiles/:username | member or app | Public profile and score of a member |
GET /api/sdk/leaderboard | member or app | Top members by XP (scope=friends for members) |
GET · PUT /api/progress/me | member | Load or save progress and the shared score |
POST /api/users/guest | anyone | Guest account without email |
GET · POST /api/users/friends | member | Friends leaderboard, add a friend |
Get an app key
App keys are given out by the ubumy team. Tell us about your app and what it needs to read.