I’m an Oauth newb, but I’m a fairly experienced PHP developer. I’m trying to make a page that automatically displays the names (first name and last initial) of our Patreon supports at a particular tier (like a “Thank You For Your Support” page), by querying them from the API. That way, if someone becomes a patron, they can immediately show up without us having to update the list manually.
I’ve made the script and it works perfectly… for a month. After that, the tokens expire and it doesn’t want to refresh them. I’m using code that I’m fairly confident should work, but I’m getting an "[error] => invalid_grant” response when I try to refresh the tokens.
Based on this comment (https://github.com/Patreon/patreon-php/issues/2#issuecomment-225395363) I think the answer might be that I’m not using the "Log in with Patreon” button, and getting the “code” response from it. Makes sense, because it’s just a PHP script and doesn’t use that button at all.
But the whole point of my implementation is that the user shouldn’t have to “log in” at all or “grant access”, it should just be a list of names for all to see. Will this concept not work with Patreon’s API design? Or is there a way to do what I’m attempting, without having to go through a permission button each time?
Thanks for your help!