Fetching User Profile

I am using the laravel package of patreon. When i try to fetch the user info sometimes i get the error
^ "{“errors”:[{“code”:1,“code_name”:“Unauthorized”,“detail”:“The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn’t understand how to supply the credentials required.”,“id”:“d5c8bf1b-927d-4db6-81c1-ca2bcbeed0fe”,“status”:“401”,“title”:“Unauthorized”}]} "

According to the docs here: API Reference, this can be caused by invalid auth tokens, bad API keys, or incorrect scopes.

I can’t find a laravel specific patreon package to more properly assist, but if it’s only sometimes, my guess is either the token you’re using is expired and needs refreshed (caused when they’re 30 days old or older) or the user has revoked your access to their profile (which they can do in their patreon settings).

Give a try to the PHP library. Its simple enough to be dropped into any framework.