Installation
npm
npm install @globio/sdk# yarn
yarn add @globio/sdk
# pnpm
pnpm add @globio/sdkJSR
npx jsr add @globio/sdkInitialization
Import the Globio class and initialize with your project’s client API key:
import { Globio } from '@globio/sdk';
const client = new Globio({
apiKey: 'glo_client_your_key_here',
});Get your client key from the Globio Console :
- Open your project
- Go to API Keys
- Create or copy your client key
Configuration options
const client = new Globio({
apiKey: string, // required — your project client key
});Using services
All services are immediately available on the initialized client:
// Document database
await client.doc.createCollection('players');
// Authentication
const session = await client.id.signIn({
email: 'player@example.com',
password: 'password123',
});
// File storage
await client.vault.uploadFile(file, {
metadata: { owner: 'player_001' },
});Module formats
The SDK ships both ESM and CJS builds. It works with standard bundlers (Vite, webpack, esbuild) and modern Node.js without configuration.
// ESM (recommended)
import { Globio } from '@globio/sdk';
// CJS
const { Globio } = require('@globio/sdk');Last updated on
