Skip to main content
The Gately SDK provides a simple, type-safe way to integrate authentication, user management, and content protection into your applications.

Features

Authentication

Email/password, social login, and magic links

User Management

Profiles, sessions, and account management

Page Protection

Protect content based on authentication and plans

Email Campaigns

Send campaigns to your members programmatically

Authentication Methods

The SDK supports two authentication methods depending on your environment:
Never expose API keys in client-side code. Use Project IDs for browser applications and API keys only on the server.

Quick Start

Installation

Browser Usage

For client-side applications, initialize with your API key:

React Usage

Server-Side Usage (Node.js)

For server-side applications, use your secret API key:

API Key Types

Get your API keys from Settings → API Keys in your Gately dashboard.

SDK Methods

Authentication

Session Management

User Profile

Page Protection

TypeScript Support

The SDK is written in TypeScript and includes full type definitions:

Configuration Options

Next Steps

Installation

Detailed installation instructions

Authentication

Learn about authentication methods

Page Protection

Protect your content

API Keys

Learn about API key management