API does not return Pledge tier for new Patrons

I’m trying to get the pledge tier from the API to set access rights for a User but for new patrons the response does not contain the pledge tier name like for older patrons.

I’m using this request to get the needed information

$api_client = new PatreonAPI($patreonUser->token);
        $patron_response = $api_client->get_data('identity?include=memberships,campaign&fields'.urlencode('[user]').'=email,first_name,full_name,image_url,last_name,thumb_url,url,vanity,is_email_verified&fields'.urlencode('[member]').'=currently_entitled_amount_cents,lifetime_support_cents,last_charge_status,patron_status,last_charge_date,pledge_relationship_start&fields'.urlencode('[campaign]').'=vanity');

Which for long term Patrons returns

$userTier = $data['attributes']['title']

Put for the current Patron who doesn’t get his access rights it only returns:


My Patreon membership tab shows that this patron is in the correct Tier but the API just returns that they are an active patron without a Tier.

Can anybody tell me why this happens?

Thank you

The patron could have made a custom $ pledge instead of pledging to an exact tier. Try to check it out if that is so.

Also try specifically requesting the title in the includes + relationships.

I didn’t have much time in the last 1,5 weeks to further investigate and implemented a work around for that period but I went back to it an checked the docs again.

The pledges are not custom pledges and get shown as the correct Tier inside my Patreon memberships. Therefore this is not the issue.

I forgot to mention in my initial post that I’m actually getting the Tier title with another call.

private function getUserTier(PatreonCredentials $credentials, $membership){
        $api_client = new PatreonAPI($credentials->getCreatorToken());
        return $api_client->get_data('members/'. $membership .'?include=campaign,currently_entitled_tiers&fields%5Btier%5D=title');

Relating to to https://docs.patreon.com/?shell#get-api-oauth2-v2-members-id this should be the way to check what a user is entitled to.

So the tier is coming in inside the currently_entitled_tiers then?