# API v2 endpoints seem broken?

**URL:** https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289
**Category:** API Feedback
**Created:** [October 6, 2022, 9:58pm UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289 "2022-10-06T21:58:35Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Tyrrrz](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/tyrrrz/32/2118_2.png) [@Tyrrrz](https://www.patreondevelopers.com/u/Tyrrrz)
#### Post date: [October 6, 2022, 9:58pm UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289/1 "2022-10-06T21:58:35Z")

</div>

Hi

I have a service worker running nightly that uses Patreon API to pull data from my account (using creator access token). On Oct 4 it started erroring out, then stopped on Oct 6, but now also produces errors.

I’m using the Campaigns endpoint ([https://patreon.com/api/oauth2/v2/campaigns](https://patreon.com/api/oauth2/v2/campaigns)) to get the list of my campaigns, and the Members endpoint ([https://patreon.com/api/oauth2/v2/campaigns/${campaignId}/members](https://patreon.com/api/oauth2/v2/campaigns/%24%7BcampaignId%7D/members)) to get active pledges.

It seems that both endpoints fail whenever you add arguments of any kind, for example `page[cursor]=...` or `fields[member]=...`, etc. Even following the next page link provided by the response to the base request (without any parameters) fails. All errors are the same: 404 with this body:

```auto
{
  errors: [
    {
      code: 1,
      code_name: 'NotFound',
      detail: 'The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.',
      id: '2de7eea5-5cef-5bf1-97a7-87d2a0e28a7a',
      status: '404',
      title: 'Not Found'
    }
  ]
}

```

Yes, the arguments are encoded properly and all of this used to work before. Additionally, like I said, even the link returned by the API (for the next page) returns 404.

---

<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 7, 2022, 3:56pm UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289/2 "2022-10-07T15:56:39Z")

</div>

Were you using mixed v1 and v2 tokens, endpoints and calls? You can experience oddities if you do that.

Also double check your scopes and the includes. They must match.

---

<div class="post-metadata">

### Author: ![Tyrrrz](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/tyrrrz/32/2118_2.png) [@Tyrrrz](https://www.patreondevelopers.com/u/Tyrrrz)
#### Post date: [October 8, 2022, 10:27am UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289/3 "2022-10-08T10:27:31Z")

</div>

I’m not using mixed tokens. When I was creating a token, I was only able to select v1 or v2 (I chose the latter).

I don’t think scopes are relevant, considering I’m using my own creator access token. Right?

---

<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 10, 2022, 3:57pm UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289/4 "2022-10-10T15:57:00Z")

</div>

If you are using your creator token, scopes shouldnt be a problem. But the includes, relations and fields must be correct and match. Check the order in which the includes, relations and fields are being constructed.

---

<div class="post-metadata">

### Author: ![Tyrrrz](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/tyrrrz/32/2118_2.png) [@Tyrrrz](https://www.patreondevelopers.com/u/Tyrrrz)
#### Post date: [October 11, 2022, 10:33am UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289/5 "2022-10-11T10:33:35Z")

</div>

> [@codebard](#):
>
> Check the order in which the includes, relations and fields are being constructed.

It literally already doesn’t work if it only includes a page cursor token and nothing else

---

<div class="post-metadata">

### Author: ![Tyrrrz](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/tyrrrz/32/2118_2.png) [@Tyrrrz](https://www.patreondevelopers.com/u/Tyrrrz)
#### Post date: [October 11, 2022, 3:50pm UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289/6 "2022-10-11T15:50:03Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/patreondevelopers/original/2X/8/879c2605aec0417caf27adb8fc12ea0104b13d59.png)

As you can see, I can’t even request the next page using the URL provided by the initial response. Any request involving query parameters fails with 404 error after last week.

---

<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 12, 2022, 3:20pm UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289/7 "2022-10-12T15:20:26Z")

</div>

Are you able to access the endpoint without the page cursor?

---

<div class="post-metadata">

### Author: ![Tyrrrz](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/tyrrrz/32/2118_2.png) [@Tyrrrz](https://www.patreondevelopers.com/u/Tyrrrz)
#### Post date: [October 12, 2022, 6:06pm UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289/8 "2022-10-12T18:06:40Z")

</div>

After some more testing, it turns out the issue only manifested when sending the requests through [axios](https://www.npmjs.com/package/axios) 🤯

Switching to [node-fetch](https://www.npmjs.com/package/node-fetch) appears to have solved the problem.

I couldn’t figure out why, though, as the requests they’re sending are identical in terms of headers and other metadata.

---

<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 18, 2022, 9:11pm UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289/9 "2022-10-18T21:11:53Z")

</div>

Maybe its because of the User-agent string. Can you try a call with Axios again, but this time change the user agent string to entirely something else?

---

<div class="post-metadata">

### Author: ![brandons209](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/brandons209/32/2659_2.png) [@brandons209](https://www.patreondevelopers.com/u/brandons209)
#### Post date: [June 14, 2024, 1:44am UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289/10 "2024-06-14T01:44:15Z")

</div>

Hate to bump this, but I recently ran into this issue out of the blue with the Python patreon library. Same exact issue. Tried different User Agents and different versions of urlib3 and Python to no avail. Was working fine a few months ago. Any ideas what it could be?

---

<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: [June 17, 2024, 6:41pm UTC](https://www.patreondevelopers.com/t/api-v2-endpoints-seem-broken/6289/11 "2024-06-17T18:41:39Z")

</div>

The python lib is not currently maintained, but it should largely function. You may need to modify certain parts to fit your use case.

If nothing has changed in your stack, code etc, you may contact your host to see if they have made any changes that could affect your app.
