Javascript Boilerplate to detirmine user Patron tier & Status

Has anyone found some good boilerplate for using Javascript to use the API to determine Patreon user tier and status?
I need users to log in to see if A) They are a patron and B) If they are, what tier they are.
I’m going to use this to gate downloads, patreon-js appears to be outdated, and even the example given doesn’t work?

Might end up being the case that developing a custom logon system and using Patreon-php or Zapier to keep the custom database up to date makes the most sense, which just doesn’t seem ideal.
If anyone has tackled this problem before, would appreciate the help.



I found this out the hard way. Just use standard JS and no libraries since the packages are all outdated.

here’s a snippet of code I use for my own purpose

var url = '' + inputData.patreonID + '?include=address&fields%5Baddress%5D=addressee,line_1,line_2,city,state,postal_code,country,phone_number&fields%5Bmember%5D=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'
var addressee, addressee_first_name, addressee_last_name, address_line_1, address_line_2, address_city, address_state, address_postal_code, address_country, phone_number;

const getMemberInfo = await fetch(url, {
  headers: {
      'Authorization': 'Bearer YOUR_TOKEN',
      'user-agent': 'Chrome: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36'
const res = await getMemberInfo.json();
1 Like