List supporters and tiers
/api/supportersThe tiers with the roles each gives, and the supporters with the newest payment first (at most 500). A supporter with no discordUserId has not been matched to a Discord account yet.
Needs the ManageSettings permission.
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
Response Body
application/json
application/problem+json
application/problem+json
curl -X GET "https://example.com/api/supporters"{ "kofiOn": true, "patreonOn": true, "botCanManageRoles": true, "tiers": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "provider": "string", "name": "string", "discordRoleId": null, "vrChatRoleId": null, "supporters": 0 } ], "supporters": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "provider": "string", "name": "string", "discordUserId": null, "discordName": null, "tierId": null, "tierName": null, "state": "string", "lastPaidAt": "2019-08-24T14:15:22Z", "paidThrough": "2019-08-24T14:15:22Z", "rolesEndAt": null, "discordRoleGiven": true, "vrChatRoleGiven": true, "vrChatLinked": true, "problem": null, "code": null } ], "groupRoles": [ { "id": "string", "name": "string" } ], "mostTierNameLength": 0}Take in a Patreon membership message POST
Patreon calls this when a membership is made, changed or deleted, and when a charge goes through or fails. The body is signed with the webhook secret from Patreon (hex HMAC-MD5 in X-Patreon-Signature); a message with no signature or the wrong one is refused (401) and nothing is read. An active patron with a tier gets that tier's roles; a patron whose charge was declined keeps them until the Patreon setting's number of days after the charge; a pledge that ended keeps them until the paid month is up and that number of days more (or for good, when the setting is never). Anything else is answered 200 and ignored. Answers 404 while Patreon is off or no secret is saved.
Add a supporter tier POST
Add a tier by the name the site uses for it, with the Discord role and the VRChat group role it gives. A tier is also added by itself the first time a payment names it, with no roles. Needs the `ManageSettings` permission.