Access to pledges for other creators

Hello!
I’m developing an application for podcasters to share scripts/transcriptions of podcasts in a form that can be easily viewed and searched across many devices, as opposed to the existing PDF-based (or completely nonexistant) publicly-available scripts of many podcasts today. As part of this, we’d need the ability to see what campaigns a user is part of the team of, and the ability to see what campaigns a user is a patron of. On the developer documentation, it mentions:

If your client requires the ability to ask for pledges or campaign data of other users (not just your own campaign), please contact us in the developers forum.

What information is needed for this type of request?

Thank you!

I’m interested into the same thing, how come this have 0 responses in 24 days since the official docs says to ask here? :slightly_frowning_face:

1 Like

Forgot to reply here about it but I did figure it out. You only need special permission for the V1 api, on the V2 API it just works provided you request the right scopes. We were able to get it to work with `["identity", "identity[email]", "identity.memberships", "campaigns"]` as our scopes.

1 Like

Weird, I used the scopes you provided, and I am able to get the members only for my (this) Creator account.

I tried with 2 other accounts and all i get nothing

// Output from other patreon accounts
relationships: {
  memberships: {
    data: [],
  },
},
// Output from my patreon account
relationships: {
      memberships: {
        data: [
          {
            id: "fb2b0e96-not-real-0000-00000000",
            type: "member",
          }, {
            id: "fb2b0e96-not-real-0000-00000000",
            type: "member",
          }, {
            id: "fb2b0e96-not-real-0000-00000000",
            type: "member",
          }
        ],
      },
    },

Probably I do something else wrong, no idea.
That’s how i get the data in both cases.

Summary
const { code, state } = req.query;

const tokenResponse = await fetch('https://www.patreon.com/api/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    code: code as string,
    grant_type: 'authorization_code',
    client_id: config.patreonClientId,
    client_secret: config.patreonClientSecret,
    redirect_uri: config.patreonRedirectUri
  })
});

// <code> to await for token blabla

const userResponse = await fetch('https://www.patreon.com/api/oauth2/v2/identity?include=memberships&fields%5Buser%5D=full_name,email&fields%5Bmember%5D=email,full_name,patron_status,will_pay_amount_cents,campaign_lifetime_support_cents,last_charge_date,last_charge_status,next_charge_date,pledge_cadence,pledge_relationship_start', {
    headers: { 'Authorization': `Bearer ${tokenData.access_token}` }
});

I’ll play a bit more with this, I just started an hour ago or so,

Thanks for the tip

1 Like

My implementation is in C#, but take a look at this:
https://gitlab.com/kbity/burger/-/blob/develop/Burger/Services/PatreonService.cs?ref_type=heads#L116-L140

2 Likes

I just realized I was literally using the wrong endpoint lol, thank you for the scope tip and code
I got it to work, saved me a lot of time and frustration, I wish you good luck with your projects ! :handshake:

2 Likes