How to identify the correct ID for currently_entitled_tiers

Hi there!

I’m currently making a request to https://www.patreon.com/api/oauth2/v2/identity?include=memberships.currently_entitled_tiers and I’m able to get some data back

  included: [
    {
      attributes: {},
      id: '3f7e6265-52dc-4837-a1bf-c6fb8cd92632',
      relationships: [Object],
      type: 'member'
    },
    {
      attributes: {},
      id: 'bd71839c-8391-444d-bd80-075b96d14f24',
      relationships: [Object],
      type: 'member'
    },
    {
      attributes: {},
      id: 'f9bcf7f2-e3ff-425c-8124-4fbb370c3f9e',
      relationships: [Object],
      type: 'member'
    },
    { attributes: {}, id: '5677061', type: 'tier' },
    { attributes: {}, id: '9384773', type: 'tier' }
  ],
  links: { self: 'https://www.patreon.com/api/oauth2/v2/user/17981519' }

My question is how can I know which ID belongs to the campaign I’m looking for (3f7e6265-52dc-4837-a1bf-c6fb8cd92632, etc)? I was able to manually locate it by finding a match in the tier IDs that exist on one of the creator pages, however, I would like to know in the future how I could just locate this ID ahead of time. Also, I’m assuming that no two creators would share the same id for any tier?

Thanks!

You can either map the data over the member ids to your campaign, or request the related info (campaign id etc) through relations.

https://docs.patreon.com/#get-api-oauth2-v2-identity

1 Like