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

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

RequestWhoWhat
GET /api/sdk/mememberYour profile, score and plan
PATCH /api/sdk/mememberChange username, display name or sharing
GET /api/sdk/profiles/:usernamemember or appPublic profile and score of a member
GET /api/sdk/leaderboardmember or appTop members by XP (scope=friends for members)
GET · PUT /api/progress/mememberLoad or save progress and the shared score
POST /api/users/guestanyoneGuest account without email
GET · POST /api/users/friendsmemberFriends 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.