Linking One users campaign to another users membership

Hi Guys,

Pretty confused here. Trying to use Patreon login (for a content creator) to retrieve a list of their campaigns… and then using Patreon login (for the consumer/patron) to figure out if they are a member of the creator’s campaign…

To retrieve the creators campaigns, am using this…
https://patreon.com/api/oauth2/v2/campaigns?include=tiers&fields[campaign]=creation_name%2Cpledge_url

which gives me something like this…
{
“data”: [
{
“attributes”: {
“creation_name”: “Instructional videos”,
“pledge_url”: “/join/transcript_systems”
},
“id”: “6137275”,
“relationships”: {
“tiers”: {
“data”: [
{ “id”: “6817869”, “type”: “tier” },
{ “id”: “6817873”, “type”: “tier” }
]
}
},
“type”: “campaign”
}
],
“included”: [
{ “attributes”: {}, “id”: “6817869”, “type”: “tier” },
{ “attributes”: {}, “id”: “6817873”, “type”: “tier” }
],
“meta”: { “pagination”: { “total”: 1 } }
}

So basically a 7 digit numeric for the ID of the campaign and each tier.

To retrieve the consumer’s campaign memberships am using this…

https://patreon.com/api/oauth2/v2/identity?include=memberships

which returns
{
“data”: {
“attributes”: {},
“id”: “50000001”,
“relationships”: {
“memberships”: {
“data”: [
{ “id”: “b166f406-d8b5-48d8-834e-e8cb4088eef7”, “type”: “member” }
]
}
},
“type”: “user”
},
“included”: [
{
“attributes”: {},
“id”: “b166f406-d8b5-48d8-834e-e8cb4088eef7”,
“type”: “member”
}
],
“links”: { “self”: “https://www.patreon.com/api/oauth2/v2/user/50000001” }
}

So a GUID value representing the campaigns he is a member of. So what gives? where can I get the GUID of the campaign rather than the 7 digit numeric??

Hopefully this is an easy one and I am just not RTFM properly.

Regards,
Michael

stoopid me, answer was here all along… In v2, how do I get a campaign ID from the identity endpoint?

1 Like