I’m working on a simple Client that allows me to fetch the names of my active Patrons and display them in a list (accessible through an HTTP request to a php file I’m hosting) so that my games can fetch an up-to-date list of my Patrons through a simple HTTP request.
I’ve got everything set up, even the campaigns.members
scope being granted (EDIT: though I’ve been using my own account for this, which means I should have all scopes granted?), but I’m not getting any kind of meaningful info.
Here’s the URL I’m making a request to:
https://www.patreon.com/api/oauth2/v2/campaigns/{campaign_id}/members?include=currently_entitled_tiers,address&fields[member]=full_name,is_follower,last_charge_date,last_charge_status,lifetime_support_cents,currently_entitled_amount_cents,patron_status&fields[tier]=amount_cents,created_at,description,discord_role_ids,edited_at,patron_count,published,published_at,requires_shipping,title,url&fields[address]=addressee,city,line_1,line_2,phone_number,postal_code,state
All of these characters ([, ], =) are being URL Encoded after the incude=
bit. This was pasted straight from the documentation to see if I could get any info back at all. All I really need are the full_name
and patron_status
values.
And here’s what I’m getting back. (Instances of <removed> were inserted by me)
"data": [
{
"attributes": [],
"id": "<removed>",
"relationships": {
"address": {
"data": null
},
"currently_entitled_tiers": {
"data": []
}
},
"type": "member"
},
{
"attributes": [],
"id": "<removed>",
"relationships": {
"address": {
"data": null
},
"currently_entitled_tiers": {
"data": []
}
},
"type": "member"
},
{
"attributes": [],
"id": <removed>,
"relationships": {
"address": {
"data": null
},
"currently_entitled_tiers": {
"data": []
}
},
"type": "member"
},
{
"attributes": [],
"id": <removed>,
"relationships": {
"address": {
"data": null
},
"currently_entitled_tiers": {
"data": []
}
},
"type": "member"
},
{
"attributes": [],
"id": <removed>,
"relationships": {
"address": {
"data": null
},
"currently_entitled_tiers": {
"data": []
}
},
"type": "member"
},
{
"attributes": [],
"id": <removed>,
"relationships": {
"address": {
"data": null
},
"currently_entitled_tiers": {
"data": []
}
},
"type": "member"
},
{
"attributes": [],
"id": <removed>,
"relationships": {
"address": {
"data": null
},
"currently_entitled_tiers": {
"data": []
}
},
"type": "member"
}
],
"meta": {
"pagination": {
"total": 7
}
}
}
So, what’s going on here? I know for certain that the campaigns campaigns.members
scopes are being assigned to my access token, so I should at least be getting some entries in the attributes
sections (again, all I need are the full_name
and patron_status
values).
The stored access token/scopes:
{"access_token": <removed>, "expires_in": 2678400, "token_type": "Bearer", "scope": "campaigns campaigns.members", "refresh_token": <removed>, "version": "0.0.1"}
…so I’m not sure what could be going wrong.