# Actualizar plugin de Discourse de Patreon a API v2

**URL:** https://meta.discourse.org/t/upgrade-patreon-discourse-plugin-to-api-v2/386701
**Category:** Feature
**Tags:** patreon
**Created:** [25 Octubre, 2025 00:40 UTC](https://meta.discourse.org/t/upgrade-patreon-discourse-plugin-to-api-v2/386701 "2025-10-25T00:40:54Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [26 Marzo, 2026 17:02 UTC](https://meta.discourse.org/t/upgrade-patreon-discourse-plugin-to-api-v2/386701/9 "2026-03-26T17:02:19Z")

</div>

> [@noertap](#):
>
> Ahora puedes crear el cliente de la API v2 en [Platform | Applications | Patreon](https://www.patreon.com/portal/registration/register-clients)

No logro que este formulario habilite el botón de envío, sin importar lo que intente.

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/9/8/3986a84de42ad1c95d2a58cd020c318dc3aa4474.jpeg)

Es el único obstáculo que tengo para fusionar el cambio.

> <https://github.com/discourse/discourse/pull/38871>
>
> \## Summary
> 
> Patreon API v1 has been deprecated for years and the Patreon team ha…s requested we migrate to v2 (see https://meta.discourse.org/t/upgrade-patreon-discourse-plugin-to-api-v2/386701).
> 
> Since hundreds of existing customers have v1 OAuth clients, this PR supports \*\*both versions simultaneously\*\* via an adapter pattern, controlled by a new \`patreon\_api\_version\` site setting (defaults to \`"1"\` so no one breaks on upgrade).
> 
> \### What changed
> 
> \- \*\*Adapter pattern\*\*: \`Patreon::ApiVersion::V1\` and \`ApiVersion::V2\` modules with identical interfaces for endpoints, response parsing, and OAuth config. \`ApiVersion.current\` routes based on the site setting.
> \- \*\*v2 API support\*\*: campaigns endpoint returns tiers (not rewards), members fetched separately with cursor-based pagination, v2 identity endpoint with explicit field selection, v2 OAuth scopes
> \- \*\*Webhooks accept both formats\*\*: payload version detected from \`data.type\` (\`"pledge"\` → v1, \`"member"\` → v2), regardless of the site setting
> \- \*\*Admin deprecation notice\*\*: \`ProblemCheck::PatreonApiV1Deprecated\` warns on the dashboard when still using v1
> \- \*\*Shared logic unchanged\*\*: rate limiting, PluginStore, group sync, admin UI all version-agnostic
> \- Also fixes pre-existing flaky seed/campaign spec failures
> 
> \### Migration path for existing users
> 
> 1. Admin sees deprecation warning on dashboard
> 2. Create a new v2 OAuth client at https://www.patreon.com/portal/registration/register-clients
> 3. Update credentials in site settings
> 4. Switch \`patreon\_api\_version\` to \`"2"\`
> 5. Creator re-authenticates via Patreon login to get v2-scoped tokens
> 6. Trigger a manual data sync from the Patreon admin panel
> 
> \### Future v1 removal
> 
> When ready to drop v1: delete \`lib/api\_version/v1.rb\`, the problem check, the site setting, v1 fixtures, and v1 test contexts — one clean cut.
> 
> \## Test plan
> 
> \- \[x\] All 41 plugin specs pass (both v1 and v2 contexts)
> \- \[x\] Lint passes on all changed files
> \- \[x\] Zeitwerk reload passes (\`bin/rails runner "Rails.application.reloader.reload!"\`)
> \- \[\] Manual testing with a real Patreon v2 OAuth client

---

_[View the full topic](https://meta.discourse.org/t/upgrade-patreon-discourse-plugin-to-api-v2/386701)._
