# Fetching User Profile

**URL:** <https://www.patreondevelopers.com/t/fetching-user-profile/4875>\
**Category:** API Feedback\
**Created:** [October 27, 2021, 7:45am UTC](https://www.patreondevelopers.com/t/fetching-user-profile/4875 "2021-10-27T07:45:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![test181](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@test181](https://www.patreondevelopers.com/u/test181)\
**Post date:** [October 27, 2021, 7:45am UTC](https://www.patreondevelopers.com/t/fetching-user-profile/4875/1 "2021-10-27T07:45:23Z")

</div>

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”}]} "

---

<div class="post-metadata">

**Author:** ![Zanaras](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/zanaras/32/1792_2.png) [@Zanaras](https://www.patreondevelopers.com/u/Zanaras)\
**Post date:** [October 27, 2021, 10:17pm UTC](https://www.patreondevelopers.com/t/fetching-user-profile/4875/2 "2021-10-27T22:17:36Z")

</div>

According to the docs here: [API Reference](https://docs.patreon.com/#errors), 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).

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [October 29, 2021, 7:07am UTC](https://www.patreondevelopers.com/t/fetching-user-profile/4875/3 "2021-10-29T07:07:26Z")

</div>

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

> **[GitHub - Patreon/patreon-php: Interact with the Patreon API via OAuth](https://github.com/Patreon/patreon-php)**
>
> Interact with the Patreon API via OAuth. Contribute to Patreon/patreon-php development by creating an account on GitHub.
