API returning null from member id

I’m trying to get info on my members from the API using

let url = "https://www.patreon.com/api/oauth2/v2/members/"+member_id+encodeURI(path);

I’m getting null on over 50% of url fetches.

I’ve always been able to retrieve the data for all my members before, never had an issue.

Having checked a few of the member ids returning null via audience > relationship manager, I’m wondering if it’s a currency issue: people who pay in a different currency are not returning. That’s a stab in the dark though. But I really need to resolve this error, I have time sensitive data to send. Please help!

More info:

I get a list/array of member id using:

https://www.patreon.com/api/oauth2/v2/campaigns/'+campaignID+'/members?page%5Bcount%5D=2000

(I have under 2000 members, so no need to page loop)

I then use the 36 character length ids to get info on each member.

@codebard I see various other recent errors messages regarding the API, is this related? Any thoughts? Do you need more info from me?

Do you have the full API response code and response body you could post?

Can you dm me the headers and response body that the API returns for these calls?

Let me know if this went away or still persists.

yes the problem persist, have dm’d you.

some responses are successful, some are not. For others reading, here’s an example of one that is not successful:

{ errors: 
   [ { code: null,
       code_name: 'RequestThrottled',
       detail: 'You have made too many attempts. Please try again in 10 minutes.',
       id: 'xxxxxxxxxxxxxxxxxxxxxxxxx',
       status: '429',
       title: 'You have made too many attempts. Please try again in 10 minutes.' } ] }

although I’ve put xxx’s for the id, what’s odd is that it does not match id that I requested.

let path = "?include=address,currently_entitled_tiers,user&fields[member]=full_name,is_follower,email,last_charge_date,last_charge_status,lifetime_support_cents,patron_status,currently_entitled_amount_cents,pledge_relationship_start,will_pay_amount_cents&fields[tier]=title&fields[user]=full_name,hide_pledges";
    let url  = "https://www.patreon.com/api/oauth2/v2/members/"+member_id+encodeURI(path);
    let response = UrlFetchApp.fetch(url, {
      headers: {
        Authorization: 'Bearer '+creatorAccessToken
      },
      muteHttpExceptions: true
    });

Any update please @codebard ?

This has been working fine of years and all of a sudden this error his happening. Nothing has changed on my side.

I’ve recommended to contact the developers via the Discord channel due to the lack of response here. What’s the point of this forum?

The two channels are the same. As I told you in the dm, the second one is a rate limited response. Its not related to your member. It means that you have been calling the api too rapidly. Try to make sure that your app handles 429 responses gracefully.

Thank you for the reply.

So why did that change? I’ve been using the API to get this data for over five years and never had this problem before. I’ve not changed my code in that time.

Perhaps it was related to switching to subscription billing that changed something for the API… anyway, it’s odd. I’ve added in a pause which solved it, but still puzzled as to why it stopped working in the first place

Rate limiting was recently rolled out as announced, so its new.

Ah that explains it then. I missed the announcement. Thanks