# Helix API / subscriptions KO with pagination

**URL:** <https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626>\
**Category:** API\
**Created:** [June 26, 2019, 8:50am UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626 "2019-06-26T08:50:43Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scorfly](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/scorfly/32/5660_2.png) [@Scorfly](https://discuss.dev.twitch.com/u/Scorfly)\
**Post date:** [June 26, 2019, 8:50am UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626/1 "2019-06-26T08:50:43Z")

</div>

Hi !

The pagination of subscriber is broken with Helix API (it works with Kraken)

The bug started between 2019-06-26 05:00 and 2019-06-26 05:10 Europe/Paris timezone

On the first call, there is no issue

```auto
https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=100

[…]
    }
  }
  ["pagination"]=>
  array(1) {
    ["cursor"]=>
    string(39) "eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6MTAwfX0"
  }
}

```

but when I do this call to get

```auto
https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=100&after=eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6MTAwfX0

```

Then I have a `500 - Internal Server Error`

It perfectly worked since month.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 26, 2019, 10:23am UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626/2 "2019-06-26T10:23:36Z")

</div>

> [@Scorfly](#):
>
> Then I have a `500 - Internal Server Error`

HTTP 500 is “server screwed up try again later”

So Try again later.

I am however seeing the same issue at the time of writing

---

<div class="post-metadata">

**Author:** ![Scorfly](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/scorfly/32/5660_2.png) [@Scorfly](https://discuss.dev.twitch.com/u/Scorfly)\
**Post date:** [June 26, 2019, 10:35am UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626/3 "2019-06-26T10:35:01Z")

</div>

Yep but, the issue never happen on first page.  
it only happen when i add the “after” parameter.

it started 7 hour ago.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 26, 2019, 10:35am UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626/4 "2019-06-26T10:35:56Z")

</div>

Yup, as I’ve confirmed, I’m seeing the same issue.

We can’t do much about it until Twitch gets into the office later today.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 26, 2019, 11:23am UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626/5 "2019-06-26T11:23:26Z")

</div>

Seems might be a issue with first=100 try first=90

(fine with 99 also)

---

<div class="post-metadata">

**Author:** ![Scorfly](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/scorfly/32/5660_2.png) [@Scorfly](https://discuss.dev.twitch.com/u/Scorfly)\
**Post date:** [June 26, 2019, 11:34am UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626/6 "2019-06-26T11:34:44Z")

</div>

thx it works !

there still is an issue, but its ok to me i managed it.

The issue :

- first page has 90 result as expected
- second page has 91 result instead of 90 max

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 26, 2019, 11:35am UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626/7 "2019-06-26T11:35:52Z")

</div>

That is weird I rechecked mine and with a 90 I get 91 on the first page… lovely

I do “if results is \< limit stop paginating” myself so I didn’t notice it originally

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 26, 2019, 10:15pm UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626/8 "2019-06-26T22:15:36Z")

</div>

Twitch has logged this for further investigation!

---

<div class="post-metadata">

**Author:** ![jbulava](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/jbulava/32/6777_2.png) [@jbulava](https://discuss.dev.twitch.com/u/jbulava)\
**Post date:** [July 12, 2019, 5:12am UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626/9 "2019-07-12T05:12:30Z")

</div>

This issue should have been corrected around July 2. Please let us know if there are still scenarios that result in 500 errors.

---

<div class="post-metadata">

**Author:** ![Scorfly](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/scorfly/32/5660_2.png) [@Scorfly](https://discuss.dev.twitch.com/u/Scorfly)\
**Post date:** [July 12, 2019, 7:01am UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626/11 "2019-07-12T07:01:35Z")

</div>

I still keep a limit a 90 otherwise it fail sometimes

limit 100 :

```auto
string(76) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=100"
string(122) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=100&after=eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6MTAwfX0"
string(133) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=100&after=eyJiIjp7Ik9mZnNldCI6MH0sImEiOnsiT2Zmc2V0IjoyMDB9fQ"
string(135) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=100&after=eyJiIjp7Ik9mZnNldCI6MTAwfSwiYSI6eyJPZmZzZXQiOjMwMH19"
string(135) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=100&after=eyJiIjp7Ik9mZnNldCI6MjAwfSwiYSI6eyJPZmZzZXQiOjQwMH19"

```

```auto
=> Error : 500

```

limit 99 :

```auto
string(75) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=99"
string(120) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=99&after=eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6OTl9fQ"
string(132) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=99&after=eyJiIjp7Ik9mZnNldCI6MH0sImEiOnsiT2Zmc2V0IjoxOTh9fQ"
string(133) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=99&after=eyJiIjp7Ik9mZnNldCI6OTl9LCJhIjp7Ik9mZnNldCI6Mjk3fX0"
string(134) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=99&after=eyJiIjp7Ik9mZnNldCI6MTk4fSwiYSI6eyJPZmZzZXQiOjM5Nn19"
string(134) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=99&after=eyJiIjp7Ik9mZnNldCI6Mjk3fSwiYSI6eyJPZmZzZXQiOjQ5NX19"
string(134) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=99&after=eyJiIjp7Ik9mZnNldCI6Mzk2fSwiYSI6eyJPZmZzZXQiOjU5NH19"

```

```auto
=> Error : 500

```

limit 90 :

```auto
string(75) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90"
string(120) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6OTB9fQ"
string(132) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6MH0sImEiOnsiT2Zmc2V0IjoxODB9fQ"
string(133) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6OTB9LCJhIjp7Ik9mZnNldCI6MjcwfX0"
string(134) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6MTgwfSwiYSI6eyJPZmZzZXQiOjM2MH19"
string(134) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6MjcwfSwiYSI6eyJPZmZzZXQiOjQ1MH19"
string(134) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6MzYwfSwiYSI6eyJPZmZzZXQiOjU0MH19"
string(134) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6NDUwfSwiYSI6eyJPZmZzZXQiOjYzMH19"
string(134) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6NTQwfSwiYSI6eyJPZmZzZXQiOjcyMH19"
string(134) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6NjMwfSwiYSI6eyJPZmZzZXQiOjgxMH19"
string(134) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6NzIwfSwiYSI6eyJPZmZzZXQiOjkwMH19"
string(134) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6ODEwfSwiYSI6eyJPZmZzZXQiOjk5MH19"
string(136) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6OTAwfSwiYSI6eyJPZmZzZXQiOjEwODB9fQ"
string(136) "https://api.twitch.tv/helix/subscriptions?broadcaster_id=121445595&first=90&after=eyJiIjp7Ik9mZnNldCI6OTkwfSwiYSI6eyJPZmZzZXQiOjExNzB9fQ"

```

```auto
=> all done OK

```

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [August 11, 2019, 7:01am UTC](https://discuss.dev.twitch.com/t/helix-api-subscriptions-ko-with-pagination/21626/12 "2019-08-11T07:01:36Z")

</div>

Closed on August 11, 2019, 7:01am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
