Learn how to build applications and integrations on DRIP for your own realm. This guide covers the general development flow for Realm Clients and links out to multi-realm app development when you need it.

Overview

DRIP supports two types of integrations:

Realm Clients (Direct Integration)

  • Purpose: Direct access to your own realm’s data
  • Scope: Single realm only
  • Use case: Custom dashboards, internal tools, automation scripts
  • Authorization: Scoped to your realm automatically

App Clients (Multi-Realm Apps)

  • Purpose: Build applications that can be used by multiple communities
  • Scope: Can access multiple realms with their permission
  • Use case: Third-party integrations, marketplace apps, SaaS tools
  • Authorization: Each realm must explicitly authorize your app
This guide focuses on Realm Clients for single-realm development. For app keys, cross-realm authorization, and scopes, see Multi-Realm Apps.

Using a Realm API Client

For most internal tools and single-realm integrations, use a Realm API Client. It has immediate access to your own realm and is the fastest way to build.
1

Create a Realm Client

Go to Admin > Developer > Project API and create an API client. Select only the scopes you need (e.g., realm:read, members:read).
2

Find Your Realm (Project) ID

When a project is selected in the dashboard, the Realm/Project ID appears in the header.
3

Make Your First Call

Use your API key (Client Secret) to call the API for your realm.
const API_BASE = 'https://api.drip.re/api/v1';
const API_KEY = process.env.DRIP_API_KEY; // Store securely
const REALM_ID = process.env.DRIP_REALM_ID;

async function getMembers() {
  const res = await fetch(`${API_BASE}/realm/${REALM_ID}/members/search?type=drip-id&values=all`, {
    headers: {
      Authorization: `Bearer ${API_KEY}`,
      'Content-Type': 'application/json'
    }
  });
  if (!res.ok) throw new Error(`HTTP ${res.status}`);
  const data = await res.json();
  return data.data;
}
Never expose your API key in client-side code. Use server-side calls or a secure proxy; store keys in environment variables.
Building a multi-realm app instead? See the full guide: Multi-Realm Apps.

API Client Types Explained

Realm Client Workflow

Characteristics:
  • Immediate access to your realm
  • No approval process needed
  • Scoped to single realm
  • Full permissions within your realm

App Clients (overview)

Use App Clients to build multi-realm applications that can be authorized by multiple communities (realms). Key differences vs. Realm Clients:
  • Authorization: publish your app, then each realm grants authorization
  • Credentials: use an app client secret (not a realm API key)
  • Scopes: your app selects requestedScopes; scopes are granted per realm
For app creation, cross-realm authorization, and scopes, see Multi-Realm Apps.

App Clients

See Multi-Realm Apps for app creation, scopes, and authorization flow.

Development Best Practices

1. Scope Minimization

Only request scopes you actually need:
// ❌ Bad: Requesting unnecessary scopes
const badScopes = [
  'realm:read',
  'members:read',
  'members:write',  // Not needed for read-only analytics
  'points:write',   // Not needed for analytics
  'admin:read',     // Overly broad
  'webhooks:write'  // Not needed
];

// ✅ Good: Minimal necessary scopes
const goodScopes = [
  'realm:read',     // Need realm info
  'members:read'    // Need member data for analytics
];

Next Steps