# Patreon API down? or Blocking my app?

**URL:** <https://www.patreondevelopers.com/t/patreon-api-down-or-blocking-my-app/5296>\
**Category:** Friendly Help\
**Created:** [March 2, 2022, 1:16am UTC](https://www.patreondevelopers.com/t/patreon-api-down-or-blocking-my-app/5296 "2022-03-02T01:16:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShawnHosea](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/shawnhosea/32/1834_2.png) [@ShawnHosea](https://www.patreondevelopers.com/u/ShawnHosea)\
**Post date:** [March 2, 2022, 1:16am UTC](https://www.patreondevelopers.com/t/patreon-api-down-or-blocking-my-app/5296/1 "2022-03-02T01:16:14Z")

</div>

Hey Devs,

My app was working just fine up until a few hours ago. It’s now starting to fail on the OAuth portion where Patreon redirects back to my app using the redirect URI along with a temporary authorization code. It’s now giving me a 403 unauthorized error whereas before this has worked flawlessly. I haven’t altered the code since the last time it was working.

This is the error I’m receiving from my logs. Has anyone experienced this before?

```auto
 body: `<html><head><title>patreon.com</title><script src="/cdn-cgi/apps/head/7F2Ggij0e_TCnVgy3dJ0eOuIIUs.js"></script><style>#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}</style></head><body style="margin:0"><p id="cmsg">Please enable JS and disable any ad blocker</p><script>var dd={'cid':'AHrlqAAAAAMAxjRF_mivqqsAA5AHzA==','hsh':'DAA83DD4A3D06098A6A2CE2AD90A76','t':'fe','r':'b','s':35521,'host':'geo.captcha-delivery.com'}</script><script src="https://ct.captcha-delivery.com/c.js"></script></body></html>\n`,
  statusCode: 403

```

Maybe more readable here so you don’t have to scroll right:

` body: `<html><head><title>patreon.com</title><script src="/cdn-cgi/apps/head/7F2Ggij0e_TCnVgy3dJ0eOuIIUs.js"></script><style>#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}</style></head><body style="margin:0"><p id="cmsg">Please enable JS and disable any ad blocker</p><script>var dd={'cid':'AHrlqAAAAAMAxjRF_mivqqsAA5AHzA==','hsh':'DAA83DD4A3D06098A6A2CE2AD90A76','t':'fe','r':'b','s':35521,'host':'geo.captcha-delivery.com'}</script><script src="https://ct.captcha-delivery.com/c.js"></script></body></html>\n`, statusCode: 403`

---

<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:** [March 2, 2022, 2:33pm UTC](https://www.patreondevelopers.com/t/patreon-api-down-or-blocking-my-app/5296/2 "2022-03-02T14:33:12Z")

</div>

As I also said at Discord, 403 error is a permission error for a valid token but there is no info about the endpoint and the call. So its difficult to say something with this info.

---

<div class="post-metadata">

**Author:** ![ShawnHosea](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/shawnhosea/32/1834_2.png) [@ShawnHosea](https://www.patreondevelopers.com/u/ShawnHosea)\
**Post date:** [March 2, 2022, 6:28pm UTC](https://www.patreondevelopers.com/t/patreon-api-down-or-blocking-my-app/5296/3 "2022-03-02T18:28:29Z")

</div>

Thanks for the reply @codebard. It’s failing in the initial OAuth POST request where I should be receiving the authorization token afterward. Here is the request:

```auto
let result = await tiny.post({
          url: `https://www.patreon.com/api/oauth2/token?code=${code}&grant_type=authorization_code&client_id=${client_id}&client_secret=${client_secret}&redirect_uri=${redirect_uri}`,
          headers: {
              'content-type': 'application/x-www-form-urlencoded',
              'User-Agent': 'node'
          }
      }) 

```

After that I’m usually able to do calls to the API such as this:

`let getUser = await tiny.get({ url: `https://www.patreon.com/api/oauth2/v2/identity?include=memberships.currently_entitled_tiers,campaign,memberships.campaign&fields${encodeURIComponent('[user]')}=email,first_name,full_name,image_url,last_name,thumb_url,url,vanity,is_email_verified&fields${encodeURIComponent('[post]')}=title,content,is_paid,is_public,published_at,url,embed_data,embed_url,app_id,app_status&fields${encodeURIComponent('[campaign]')}=url`, headers: { Authorization: `Bearer ${token}`, Accept: 'application/json' } })`
