Hey,
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:
"included":[
{
"attributes":{
"currently_entitled_amount_cents":400,
"last_charge_date":"2023-03-20T18:13:08.000+00:00",
"last_charge_status":"Paid",
"lifetime_support_cents":422,
"patron_status":"active_patron",
"pledge_relationship_start":"2023-03-20T18:13:06.308+00:00"
},
"id":"xxxxxxxxx",
"type":"member"
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
Sanmie