Universal Client SDK for Optare ID
npm install @optare/optareid-jsbash
npm install @optare/optareid-js
or
yarn add @optare/optareid-js
or
pnpm add @optare/optareid-js
`
Quick Start
$3
`typescript
import { OptareClient } from '@optare/optareid-js';
const client = new OptareClient({
baseUrl: 'https://id.optare.one',
clientId: 'your_client_id',
token: 'user_access_token', // From OAuth flow
});
// Get current user
const user = await client.auth.getMe();
console.log(user.email);
`
$3
`typescript
import { OptareClient } from '@optare/optareid-js';
const client = new OptareClient({
baseUrl: 'https://id.optare.one',
clientId: process.env.OPTARE_CLIENT_ID!,
clientSecret: process.env.OPTARE_CLIENT_SECRET!,
token: process.env.OPTARE_API_KEY!,
});
// Create a product
const product = await client.products.create({
name: 'Pro Plan',
slug: 'pro',
features: ['sso', 'advanced-analytics'],
});
`
API Reference
Full API documentation with all namespaces, methods, types, and examples available at docs.optare.one.
$3
- client.auth - Authentication methods
- client.license - Feature entitlement checking
- client.products - Product management
- client.org - Organization management
- client.admin - Admin operations (subscriptions, OAuth apps)
- client.webhooks` - Webhook signature verification