# Bug, v5 API returns \_id as string for featured channels

**URL:** <https://discuss.dev.twitch.com/t/bug-v5-api-returns--id-as-string-for-featured-channels/10310>\
**Category:** API\
**Created:** [May 11, 2017, 5:25pm UTC](https://discuss.dev.twitch.com/t/bug-v5-api-returns--id-as-string-for-featured-channels/10310 "2017-05-11T17:25:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkdr](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/mkdr/32/7329_2.png) [@mkdr](https://discuss.dev.twitch.com/u/mkdr)\
**Post date:** [May 11, 2017, 5:25pm UTC](https://discuss.dev.twitch.com/t/bug-v5-api-returns--id-as-string-for-featured-channels/10310/1 "2017-05-11T17:25:40Z")

</div>

Doing a GET [https://api.twitch.tv/kraken/streams/featured](https://api.twitch.tv/kraken/streams/featured) returns all stream and channel \_id as string instead of int/long.

---

<div class="post-metadata">

**Author:** ![DallasNChains](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dallasnchains/32/1608_2.png) [@DallasNChains](https://discuss.dev.twitch.com/u/DallasNChains)\
**Post date:** [May 11, 2017, 5:34pm UTC](https://discuss.dev.twitch.com/t/bug-v5-api-returns--id-as-string-for-featured-channels/10310/2 "2017-05-11T17:34:05Z")

</div>

In v5, this isn’t a bug. We [announced](https://blog.twitch.tv/action-required-twitch-api-version-update-f3a21e6c341) that all IDs should be treated as strings.

> All ID fields should be treated as strings instead of integers. Note: this is an ongoing change, so there might be some outliers.

---

<div class="post-metadata">

**Author:** ![mkdr](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/mkdr/32/7329_2.png) [@mkdr](https://discuss.dev.twitch.com/u/mkdr)\
**Post date:** [May 11, 2017, 6:07pm UTC](https://discuss.dev.twitch.com/t/bug-v5-api-returns--id-as-string-for-featured-channels/10310/3 "2017-05-11T18:07:24Z")

</div>

Then turn it around, it is a bug still then because all or (some) of your other V5 end points return it as int… I just noticed this, because featured was the only one returning it as a string, all others not.

[https://api.twitch.tv/kraken/search/channels/?query=](https://api.twitch.tv/kraken/search/channels/?query=) does return it as int.  
[https://api.twitch.tv/kraken/users?login=](https://api.twitch.tv/kraken/users?login=) does return it as int.

---

<div class="post-metadata">

**Author:** ![DallasNChains](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dallasnchains/32/1608_2.png) [@DallasNChains](https://discuss.dev.twitch.com/u/DallasNChains)\
**Post date:** [May 11, 2017, 6:21pm UTC](https://discuss.dev.twitch.com/t/bug-v5-api-returns--id-as-string-for-featured-channels/10310/4 "2017-05-11T18:21:29Z")

</div>

The users endpoint returns it as a string for me. [https://api.twitch.tv/kraken/users?login=dallas&api\_version=5&client\_id=mkz8q57of9hpecbduit36itpvles71q](https://api.twitch.tv/kraken/users?login=dallas&api_version=5&client_id=mkz8q57of9hpecbduit36itpvles71q)

For search, you’re correct. Hence the note of, “This is an ongoing change, so there might be some outliers.” Many, many teams own the set of endpoints inside of Kraken, and it takes time to get the updates to each service. That’s why we issued general guidance to treat them all as strings.

---

<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:** [June 10, 2017, 6:21pm UTC](https://discuss.dev.twitch.com/t/bug-v5-api-returns--id-as-string-for-featured-channels/10310/5 "2017-06-10T18:21:31Z")

</div>

Closed on June 10, 2017, 6:21pm UTC

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