Skip to main content

What You Can Build

  • Fan Dashboards: View all subscribers, filter by status, track engagement
  • CRM Tools: Organize fans into lists, add notes, track interactions
  • Subscription Analytics: Monitor churn, renewal rates, lifetime value
  • Targeted Campaigns: Segment fans for personalized messaging

Quick Example

Get a list of all active subscribers:
const response = await fetch("https://api.ofauth.com/v2/access/subscriptions/subscribers?type=active", {
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

const fans = await response.json()
console.log(`You have ${fans.length} active subscribers`)

Common Operations

List All Fans

Get all subscribers regardless of status:
const response = await fetch("https://api.ofauth.com/v2/access/subscriptions/subscribers?" + new URLSearchParams({
  type: "all",
  limit: "20",
  offset: "0"
}), {
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

const fans = await response.json()
// Returns array of fan objects with subscription details

Filter by Subscription Status

// Active subscribers only
const active = await fetch(
  "https://api.ofauth.com/v2/access/subscriptions/subscribers?type=active",
  { headers }
)

// Expired (churned) subscribers
const expired = await fetch(
  "https://api.ofauth.com/v2/access/subscriptions/subscribers?type=expired",
  { headers }
)

// All-time subscribers
const all = await fetch(
  "https://api.ofauth.com/v2/access/subscriptions/subscribers?type=all",
  { headers }
)

Search Subscribers

const response = await fetch(
  "https://api.ofauth.com/v2/access/subscriptions/subscribers?" + new URLSearchParams({
    query: "john",
    type: "active"
  }),
  { headers }
)

Get Fan Details

Fetch detailed information about a specific user:
const response = await fetch("https://api.ofauth.com/v2/access/users/123456", {
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

const fan = await response.json()
// Returns full user profile

User Lists

Organize fans into custom lists for targeted messaging.

Get All Lists

const response = await fetch("https://api.ofauth.com/v2/access/users/lists", {
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

const lists = await response.json()
// Returns custom lists like "VIPs", "New Fans", etc.

Get Users in a List

const response = await fetch("https://api.ofauth.com/v2/access/users/lists/LIST_ID/users?" + new URLSearchParams({
  limit: "20",
  offset: "0"
}), {
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

const usersInList = await response.json()

Create a List

const response = await fetch("https://api.ofauth.com/v2/access/users/lists", {
  method: "POST",
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    name: "VIP Fans"
  })
})

const newList = await response.json()

Add Users to a List

const response = await fetch("https://api.ofauth.com/v2/access/users/lists/LIST_ID/users", {
  method: "POST",
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    userIds: [123, 456, 789]
  })
})

Remove User from a List

const response = await fetch("https://api.ofauth.com/v2/access/users/lists/LIST_ID/users/USER_ID", {
  method: "DELETE",
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

User Management

Restrict a User

Restrict a user from interacting:
const response = await fetch("https://api.ofauth.com/v2/access/users/123456/restrict", {
  method: "POST",
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

Unrestrict a User

const response = await fetch("https://api.ofauth.com/v2/access/users/123456/restrict", {
  method: "DELETE",
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

Get Restricted Users

const response = await fetch("https://api.ofauth.com/v2/access/users/restrict", {
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

Get Blocked Users

const response = await fetch("https://api.ofauth.com/v2/access/users/blocked", {
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

API Endpoints

EndpointMethodDescription
/v2/access/subscriptions/subscribersGETList all subscribers
/v2/access/users/{userId}GETGet user details
/v2/access/users/{userId}/restrictPOSTRestrict a user
/v2/access/users/{userId}/restrictDELETEUnrestrict a user
/v2/access/users/restrictGETList restricted users
/v2/access/users/blockedGETList blocked users
/v2/access/users/listsGETGet all user lists
/v2/access/users/listsPOSTCreate a user list
/v2/access/users/lists/{listId}GETGet a user list
/v2/access/users/lists/{listId}PATCHUpdate a user list
/v2/access/users/lists/{listId}DELETEDelete a user list
/v2/access/users/lists/{listId}/usersGETGet users in a list
/v2/access/users/lists/{listId}/usersPOSTAdd users to a list
/v2/access/users/lists/{listId}/users/{userId}DELETERemove user from list

Full API Reference

See complete endpoint documentation

Query Parameters

Subscribers Query

ParameterTypeDefaultDescription
limitnumber10Results per page (1-20)
offsetnumber0Pagination offset
typestring”active”Filter: all, active, expired
querystring""Search by name/username

Advanced Filters

The filter object supports additional filtering:
FilterTypeDescription
promoIdstringFilter by promotion ID
trial_idstringFilter by trial ID
durationstringFilter by subscription duration
tipsstringFilter by tip amount
total_spentstringFilter by total spent
onlinestringFilter by online status

Subscriber Data Structure

Each subscriber object includes:
{
  "id": 123456,
  "username": "fanname",
  "name": "Fan Display Name",
  "avatar": "https://media.ofauth.com/...",
  "subscribedAt": "2024-01-15T10:30:00Z",
  "expiredAt": "2024-02-15T10:30:00Z",
  "renewedAt": null,
  "subscribeDuration": 30,
  "totalSpent": 49.99,
  "subscribesCount": 3,
  "hasStories": false,
  "isVerified": false
}

Tips & Best Practices

Pagination: Large fan lists are paginated. Use the offset and limit parameters to page through results. Maximum limit is 20 per request.
Caching: Fan lists don’t change frequently. Consider caching subscriber data and refreshing periodically rather than on every request.
Privacy: Handle fan data responsibly. Don’t expose personal information and follow applicable data protection regulations.