# How to Automate Patreon Membership Analytics using the API

- Tool: API Automations
- Difficulty: Intermediate
- Fix time: 60 minutes
- Compatibility: Patreon API v2 — use OAuth2 Creator's Access Token
- Last updated: May 2026

## TL;DR

Fetch campaign stats with GET /api/oauth2/v2/campaigns/{id}?include=tiers,goals&fields[campaign]=patron_count,paid_member_count,pledge_sum and paginate all members via GET /api/oauth2/v2/campaigns/{id}/members. The most common gotcha: without explicit fields[] and include= parameters, Patreon API v2 returns only {id, type} — no data. Always include a User-Agent header or you get a cryptic 403. Requires campaigns.members OAuth2 scope.

## Best practices

- Always specify fields[] parameters — empty attributes objects are the #1 source of confusion with Patreon's JSON:API format
- Always include User-Agent header — missing it returns a 403 that looks like an auth error and wastes debugging time
- Use the Creator's Access Token for your own campaign analytics — it carries all required scopes automatically without OAuth flow complexity
- Never use patreon-js SDK — it's officially deprecated by Patreon and targets the dead v1 API
- Handle all three patron_status values: active_patron, declined_patron, and former_patron — declined patrons still count as members and can recover
- Add 500ms delays between pagination requests for large campaigns to avoid undisclosed rate limits
- Implement token refresh logic from day one — production automations will outlast the ~1-month access token lifetime

## Frequently asked questions

### Why does the API return only {id, type} with no data?

This is Patreon's JSON:API sparse fieldsets feature. Without explicit fields[] parameters, every resource returns only its ID and type. You must add fields[campaign]=patron_count,paid_member_count,pledge_sum to the campaign endpoint and fields[member]=full_name,patron_status,... to the members endpoint. This is the #1 gotcha for new Patreon API developers.

### What's the difference between patron_count and paid_member_count?

patron_count includes all patrons following your campaign, including free-tier followers. paid_member_count only counts patrons with an active paid pledge. pledge_sum is the total of all currently entitled pledge amounts in cents — use this divided by 100 for your MRR figure.

### How do I find my campaign ID?

Call GET /api/oauth2/v2/campaigns with your Creator's Access Token. The response includes your campaign's ID, which you'll use for all subsequent endpoints. With a Creator token, you typically have exactly one campaign. Store the campaign ID as a constant once retrieved.

### Why am I getting 403 even though my token is correct?

Missing User-Agent header. Patreon explicitly warns: 'Make sure to include a User-Agent header in your code that calls the API, otherwise your calls may be dropped with a 403 response.' Add 'User-Agent: YourAppName (contact@yourapp.com)' to every request header.

### How many members can I fetch per page?

The default is 1,000 members per page. If you include pledge_history in the includes parameter, the limit drops to 500 per page. Iterate using the links.next cursor URL returned in the response — not a page number. When there's no next link, you've fetched all members.

### Can I use the official Patreon Node.js SDK?

No — the official patreon-js package is deprecated by Patreon itself. Their docs state it 'uses Patreon API v1, which is deprecated and no longer maintained.' Use direct fetch/axios calls or the community patreon-api.ts library for TypeScript projects.

### What does declined_patron status mean for revenue calculations?

A declined_patron is someone whose payment failed (card declined, expired, etc.) but who hasn't explicitly cancelled. Their last_charge_status will be 'Declined'. These patrons are not included in MRR calculations since no payment succeeded. They may recover — don't remove them from your member list immediately.

---

Source: https://www.rapidevelopers.com/api-automations/how-to-automate-patreon-membership-analytics-using-the-api
© RapidDev — https://www.rapidevelopers.com/api-automations/how-to-automate-patreon-membership-analytics-using-the-api
