Getting a Patreon current tier via API

I’ve spent many hours trying to get this info via the API but failed to do so.
I just want to get the current tier of a user. I have their access_token (I don’t know if I should use theirs or my admin user access token) but I can’t find how to access the current tier info.

Can someone tell me which call I should make please?

Sorry if I missed it, I really tried.

Thanks

Try the examples in the below lib by adapting them to your stack:

If you are using your creator’s access token, you can access all the info of your campaign and members directly with that token without needing to have anyone go through oauth.

For an all-in one call for logged in users, try the below one:

Thanks for your answer but I’m not a PHP dev. I tried to understand it. I used the same URI for tiers and identity and got a maximum call stack size exceeded error. And even looking at this code I can see how unreliable this is. Like the comment “v2 doesnt seem to return the default tiers. We have to add them manually:”.

Come on it’s such a simple use case. For a given member id, what is their current tier.

So do you confirm that a GET of this URL “https://www.patreon.com/api/oauth2/v2/identity?include=memberships.currently_entitled_tiers,memberships.campaign&fields[user]=email,first_name,full_name,image_url,last_name,thumb_url,url,vanity,is_email_verified&fields[member]=currently_entitled_amount_cents,lifetime_support_cents,campaign_lifetime_support_cents,last_charge_status,patron_status,last_charge_date,pledge_relationship_start,pledge_cadence”’ with the right Authorization headers should return the infos I need?

It looks like you are using JS then. That error is something at your side, not our side.

As long as you have a token with the correct scopes, the call that you are using should return all the info that you are asking for in the call.