Getting StartedSDK Installation

SDK Installation

Open Preview is API-first. Use the JavaScript examples as the target SDK shape, or call the REST API directly until published packages are finalized.

Requirements

  • Node.js 18+ or Bun 1+ for local wrappers
  • Any backend runtime that can make HTTPS requests
  • A server-side project key from the dashboard
  • A receipt verification step before execution
JavaScript / TypeScript
Install
npm install @silentauth/sdk
# or with yarn
yarn add @silentauth/sdk

# or with pnpm
pnpm add @silentauth/sdk
Initialize
import { SilentAuth } from '@silentauth/sdk';

const sa = new SilentAuth({
  projectId: process.env.SA_PROJECT_ID,
  secretKey: process.env.SA_SECRET_KEY,
});
Python
Install
pip install silentauth
# or with poetry
poetry add silentauth
Initialize
from silentauth import SilentAuth
import os

sa = SilentAuth(
    project_id=os.environ['SA_PROJECT_ID'],
    secret_key=os.environ['SA_SECRET_KEY'],
)
Go
Install
go get github.com/silentauth/silentauth-go
Initialize
import "github.com/silentauth/silentauth-go"

sa := silentauth.New(silentauth.Config{
    ProjectID: os.Getenv("SA_PROJECT_ID"),
    SecretKey: os.Getenv("SA_SECRET_KEY"),
})
PHP
Install
composer require silentauth/silentauth-php
Initialize
use SilentAuth\SilentAuth;

$sa = new SilentAuth([
    'project_id' => getenv('SA_PROJECT_ID'),
    'secret_key'  => getenv('SA_SECRET_KEY'),
]);

Environment Variables

Add your credentials to your environment. Never commit secret keys to source control.

# .env
SA_PROJECT_ID=proj_xxxxxxxxxxxxxxxx
SA_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxx

Find your credentials in the SilentAuth Dashboard under Projects → API Keys.