Getting Started with OrbioCloud Platform API
Installation
Install the OrbioCloud SDK in your project:
npm install @orbiocloud/clientInitialize the Client
Create an OrbioClient instance with your API key:
import { OrbioClient } from '@orbiocloud/client';
const orbio = new OrbioClient({
apiKey: 'your_publishable_key',
});API Key Types
OrbioCloud uses two types of API keys:
Publishable key (pk) — Safe for client-side use. Can call auth endpoints and read data.
Secret key (sk) — Server-side only. Full access including writes and deletions. Never expose in client code.
Key format: orbio_{env}_{type}_{suffix} where env is live or test, type is pk or sk.
Your First Request
// Sign up a user
const { user, session } = await orbio.auth.signUp({
email: '[email protected]',
password: 'securepassword',
});
console.log('User created:', user.id);Headers
Every request requires the X-API-Key header. When a user is signed in, the SDK automatically includes the X-Access-Token header for user-scoped operations.
Response Format
All endpoints return a consistent envelope:
{
"success": true,
"data": { ... }
}Error responses include an error message:
{
"success": false,
"error": "Description of what went wrong"
}Next Steps
Authentication — Sign up, sign in, manage sessions
Collections — Store and query data
Storage — Upload and manage files
Billing — Stripe-powered subscriptions