Skip to main content
Member Content allows you to define access rules in your Gately dashboard and enforce them across your website.

Overview

Instead of hardcoding access rules in HTML, you can:
  1. Define content items in your dashboard
  2. Set access rules (plans, custom conditions)
  3. Reference content by ID in your code
  4. SDK automatically enforces access

Creating Member Content

Via Dashboard

  1. Go to Gated Content in your dashboard
  2. Click Create Content
  3. Configure:
    • Name (e.g., “Premium Course”)
    • URL pattern (e.g., /courses/*)
    • Required plan(s)
    • Redirect URL for unauthorized users
  4. Save

Via API

Checking Access

SDK Method

Response

URL Pattern Matching

Define URL patterns to automatically protect pages:

Auto Protection

Enable automatic protection based on URL patterns:
When a page loads:
  1. SDK checks URL against member content patterns
  2. If match found, access is verified
  3. Unauthorized users are redirected

React Integration

Plan-Based Access

Single Plan

Multiple Plans (OR)

Plan Hierarchy

Configure plan hierarchy in settings:
Users with higher plans automatically get access to lower-tier content.

Custom Access Rules

For advanced scenarios, use custom rules:

Handling Denied Access

Redirect

Show Upgrade Prompt

Webhooks

Track content access attempts:

Best Practices

Name content clearly (e.g., “Premium Video Course” not “Content 1”).
Always show users how to get access to protected content.
The SDK caches access checks to minimize API calls.