I’m just getting started with integrating Patreon into my Web site. I’m not going to do anything too complicated… no special content, I’m just going to disable the ads for paid members and set a cookie for a month.
I’m using the Patreon PHP library that’s on GitHub. I figured out how to make a “Login with Patreon” link, and I set up a page on my site (the redirect_uri ) that gets the access and refresh tokens and then does a “fetch user” query to Patreon’s API.
The data that comes back from the “fetch_user” function in the library apparently comes from the “identity” API. There are two variables that might potentially tell me whether or not they’re a paid member:
- data/relationships/memberships/data/0/type (“member” or not)
- included/0/attributes/patron_status (“active_patron” or not)
My question is, what’s the difference between these two? Does memberships->type get set to “member” even if they’re in a “free membership” tier? Whereas patron_status is only “active_patron” if they’re on a regular payment plan?
All I really care about are the following pieces of info:
• Their name
• Their email address
• Whether they’re currently a paid member
• Which tier they’ve subscribed to
Can someone help me create a minimal v2 API URL that would include just those fields? I’ve no qualms about modifying the files I got from GitHub.