Using PHP to get number of Patreons

Greetings!

I wanted to ask for help to try to make a PHP script that extracts the number of Patreons, I want to make a small screen for my desktop with a rasberry pi that allows me to see the current number of patreons I have.

Something like this

I’ve been reading the information here:
https://docs.patreon.com/#apiv2-resource-endpoints

But as much as I try, I can’t get it to return the information. I already have my API key and everything else, even my website has a Login with Patreon button, however, I try to use CURL, and other methods and I can’t get it to return the information I need. I even have a webhook that sends me the information when a Patreon registers or cancels their pledge. But I feel like it’s not 100% accurate. Once the info is in my server, my PHP and MySQL can do the proper calculations to give me the number.

Is there any sample script you can provide me? Thanks!

Try including each of the specific fields that you want to get in the api call. If you dont include any fields, the api does not return anything in most cases. For PHP you can just use the PHP lib - it already has various examples too: