Want to 'GET' total pledge amount

#1

Hey there. I’m new to API programming and was looking to do something that was (hopefully) simple to get started. I thought I’d try to get the total pledged amount from my Patreon campaign, so that it was visible on the front end of my site, but I’m having trouble. The most experience I have using API is with Javascript/AJAX on the frontend. (I can use Node, but my site is not run in a Node environment, so that’s a bust. The site is made using a PHP CMS that my friend built. I can kind of understand what’s going on in PHP, but I’ve never coded in it myself.)

I’m wondering how I’d go about getting that request. If it’s possible to do it with just a frontend HTTPS request, that would be preferable, but it either seems like you can’t do that or I’m missing something obvious. I’ve been reading the documentation up and down, but so far I’ve only gotten “unaccepted character (’]’, ‘[’)” and “unauthorized” errors in Postman. The access token is in (at least in Postman – I’m not totally sure how to obscure it in the site either), so I’m not quite sure what I did wrong.

I hope you can forgive what is probably a naive question, and I’d be very grateful for any guidance.

0 Likes

#2

Hi there. You can make requests to our API in the frontend, but you’ll need an access key in all cases. You can get an access key by following the OAuth flow. https://docs.patreon.com/#oauth

0 Likes