Configure Patreon integration with Discourse

:bookmark: This guide explains how to set up and configure Patreon integration with your Discourse forum, including user synchronization, group management, and access control.

:person_raising_hand: Required user level: Administrator

:warning: Requires the Discourse Patreon plugin to be installed

Summary

This guide covers:

  • Setting up Patreon API credentials
  • Configuring the Discourse Patreon plugin
  • Synchronizing Patreon users with Discourse groups
  • Managing Patron group settings
  • Setting up webhooks for real-time updates
  • Restricting site access to Patreon supporters

:exclamation: Only members who have pledged to a tier membership will be synced to Discourse groups. Free users and users under the 7-day free trial will not be synchronized.

Creating Patreon credentials

  1. Go to the Patreon Client & API Keys page
  2. Click “Create Client”

  1. Fill in the form with these details:
  • App Name
  • Description
  • App Category
  • Author
  • Company Domain: discourse.example.com
  • Privacy Policy URL: https://discourse.example.com/privacy
  • Terms of Service URL: https://discourse.example.com/tos
  • Redirect URIs: https://discourse.example.com/auth/patreon/callback
  • Client API Version: Set to 1

:warning: Using Client API Version 2 may cause authentication errors.

  1. Click “Create Client”
  2. Save your credentials for the next step

Configuring the Discourse plugin

  1. Navigate to your Admin → Site Settings panel
  2. Enter Patreon in the search bar.
  3. Copy and Paste the following from your Patreon Client to Discourse :
  • patreon client id
  • patreon client secret
  • patreon creator access token
  • patreon creator refresh token

Optional settings:

  • Enable donation prompts by checking patreon donation prompt enabled and setting your campaign URL
  • Enable Patreon login by setting your patreon creator discourse username and checking patreon login enabled
  • Check patreon enabled to activate the plugin

Synchronizing Patreon data

  1. Visit https://discourse.example.com/admin/plugins/patreon
  2. Click “Update Patreon Data”

A successful sync will display a confirmation message:

Linking Patreon tiers to Discourse groups

  1. Select a Discourse group from the Group dropdown
  2. Choose a Patreon reward tier from the Rewards dropdown
  3. Click the Save icon

After linking groups, click “Update Patreon Data” again to sync existing users.

Patron group customization

The default Patron group includes:

  • Avatar flair
  • Patron badge

To customize these:

  1. Visit the Patron group page
  2. Click the “Manage” tab
  3. Adjust flair and group description settings

Setting up webhooks (optional)

To enable real-time synchronization:

  1. Visit Platform | Applications | Patreon
  2. Create a webhook pointing to https://discourse.example.com/patreon/webhook

  1. Enable these triggers:
  • Create Pledge
  • Update Pledge
  • Delete Pledge

  1. Copy the webhook secret to your patreon webhook secret site setting

Restricting site access to Patreon supporters

To limit site access to Patreon users:

  1. Ensure Patreon login is working
  2. Disable these settings:
  • enable local logins
  • enable local logins via email

To restrict access to only your Patreon supporters:

  1. Configure category security settings
  2. Link categories to Patreon-connected groups

Troubleshooting

Enable verbose logging by activating the patreon verbose log setting. Access logs at https://discourse.example.com/logs.

Additional resources

Last edited by @jessii 2024-11-18T20:35:57Z

Check documentPerform check on document:
30 Likes