Configuring Patreon integration with Discourse

The group has to be named “Patrons” exactly in order for the badge to work. I know that.

3 Likes

Is there any way to link patreon accounts and discourse accounts with different email address together yet? potentially using secondary email address on discourse as suggested by @Falco

1 Like

Yes, it should work fine with the secondary email address.

7 Likes

So, do we still need at least one patron for the plugin to work correctly?

I’m getting an obscure “Error”

when trying to sync the manually created group “Peers” with similar tier on Patreon:

image

This is a fresh setup (new forum, standard single-container setup, first plugin added, no patrons, old webhooks tested OK:200, tried both Patreon API v1 and v2).

Also, I don’t want the “Patrons” group, so how do I prevent it being created upon the next Update Patreon Data & Sync Groups?

No errors in the Discourse logs, only couple errors in the browser console:

/logs/report_js_error:1 Failed to load resource: the server responded with a status of 429 ()
/patreon/list.json:1 Failed to load resource: the server responded with a status of 500 ()
2 Likes

There has been a recent update to the plugin that should fix this issue. Can you try pulling in the latest version of the Discourse Patreon plugin and see if that fixes the issue for you?

6 Likes

Thanks @Simon_Cossar!
Now I can successfully sync the groups with tiers and no errors displayed or logged.
Except, bunch of such errors in my browser’s console when syncing (and both gone after page refresh):

Failed to load resource: the server responded with a status of 429 ()

for two routes:

  • /logs/report_js_error
  • /mini-profiler-resources/results

But I’m not sure these errors relate to the current topic.

1 Like

They are not related. Usually 429 errors are temporary. 429 means there’s a rate limit that has been overcome by too many requests.

6 Likes

On a related note:
Patreon will usually charge the newly signed-up members on the 1st day of the next month.
So, is there a workaround or some way to enforce immediate charging to avoid two cases:

  1. Legit folks signing up and waiting before they can be granted full membership privileges (eg. posting).
  2. Spammers signing up and then canceling before the 1st charge to be made (if posting allowed for patrons group).

Any advice welcome!

1 Like

User’s membership in a group (eg. “Peer”) doesn’t get auto-revoked following the journey:

User paid via Patreon (OK) => Login (with Patreon, OK)
=> Got added to “Peer” group (OK)
=> Cancelled his pledge on Patreon (OK, not charged yet as billing was scheduled in future, March 1st)
=> User still belongs to both “Peer” and “Patron” groups (Bad! should be auto-removed from the group)
=> After some time, Admin manually synced with Patreon using Update Patreon Data & Syc Groups (OK)
=> User still belongs to both “Peer” and “Patron” groups (Bad! should be auto-removed from the group)

So, how do I make sure the user gets auto-removed from groups upon cancelling their pledge?

1 Like

Did you configure the webhook section in OP correctly? It should take care of the “canceled pledges” part.

5 Likes

Yes I did, according to instructions (since the beginning). However only the first three webhooks (deprecated, pledges:create/update/delete) return Test Response --- Status code: 200.
The newer webhook events are turned OFF because they return nothing when tested (not even the Status code: 403)

Unfortunately the problem persists, i.e. the user who cancelled his pledge is still in the Peer & Patrons groups.

1 Like

How do I configure Discourse, so people can login only with the email that they used to buy membership via my Patreon page? (i.e. user’s should not be able to sign-up directly)

Currently, if I disable " allow new registrations" the “Sign-Up” button will go away (which is OK), but then the new users cannot join the forum even if they pledged membership via Patreon.

Of course I can allow new registrations and limit such users to see only the “Welcome to Discourse” post, but this is a less desirable experience.

Appreciate any input!

1 Like

Currently, this is the only way how you can limit non-patron users. I hope you already disabled the “enable local logins” site setting.

5 Likes

Hello, I’m trying to set this up.

I have filled out the configuration in discourse and want to run the first sync.

However, when I go to plugins and click on patreon, I get this error:

Server Error

while trying to load patreon/list.json
Error code: 500 error

I have set up patreon on my test forum earlier, and that went fine. Now I’m trying to do the same, with new patreon client secrets etc, but I get this error when I want to configure the plugin.

All other plugins etc work fine. This is only when I click on “patreon” on the plugins page.
what can I do to fix this?

1 Like

Can you see anything suspicious on /logs URL?

6 Likes

Oh! I didn’t even know ‘/logs’ was a thing! Thank you already for that.

And yes, here is the error:

Discourse::SiteSettingMissing (patreon_creator_access_token)
/var/www/discourse/plugins/discourse-patreon/app/controllers/patreon_admin_controller.rb:92:in `patreon_tokens_present?

Ooo I forgot the access token…

Ahem…

So yes, issue solved.

9 Likes

This looks great! Without restricting functionality based on whether they contribution or not:

  • Is this a solid plugin for allowing Social/Oauth login for our Patrons?
  • Would it be possible to auto-assign them a “Donor” badge based whether they support our Patreon?

Also, is it possible to send Patreon statistics to a specific Discourse category or thread? Thanks for any information & clarification.

Hello, posted about this in the patreon plugin category but seems no one knows the answer - maybe here?

after installing it and launching my forum, I got my first patron. (Yay)
He has been placed in the group automatically, however wasn’t assigned the badge.

I have renamed group and badge to “supporters”
Tested also running the badge query in data explorer but comes out with 0 results.

Query:
This is the query, it’s the one the patreon plugin created for the badges. the only thing i changed the name of the group in supporters instead of patreon.

select user_id, created_at granted_at, NULL post_id from group_users where group_id = ( select g.id from groups g where g.name = 'supporters' )

and it returns 0 cases. Should be 1 :slight_smile:

Could anyone point me in the right direction where the issue lies and how to fix it?

Thank you in advance ! :slight_smile:

1 Like

Hi, I set up this great plugin and everything works fine, but there is one issue: patrons get added to the group “patrons”, but not to any additional groups set up for the different tiers. Any advice? Thanks!

1 Like

Can you confirm that you have setup a filter for the group? It should look something like this:

If so, what happens when you click the “Update Patreon Data” button? Do you see any errors in your site’s logs?

One possible cause of issues with syncing groups is if you have over 10 000 supporters on Patreon. The max_patreon_api_reqs_per_hr and possible the max_patreon_api_reqs_per_day site settings need to be increased to handle this case.

4 Likes