# I use same header value. but one work, one not work

**URL:** <https://discuss.dev.twitch.com/t/i-use-same-header-value-but-one-work-one-not-work/12395>\
**Category:** API\
**Created:** [October 11, 2017, 3:50pm UTC](https://discuss.dev.twitch.com/t/i-use-same-header-value-but-one-work-one-not-work/12395 "2017-10-11T15:50:22Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Adrian\_Schofield](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/adrian_schofield/32/2340_2.png) [@Adrian\_Schofield](https://discuss.dev.twitch.com/u/Adrian_Schofield)\
**Post date:** [October 11, 2017, 6:13pm UTC](https://discuss.dev.twitch.com/t/i-use-same-header-value-but-one-work-one-not-work/12395/4 "2017-10-11T18:13:42Z")

</div>

Yeah your header format is incorrect, I’m not a javascript expert but it can’t be a string like that you need to form your headers as an object like this:

headers: {  
‘Client-ID’: ‘blablabla’,  
‘Accept’: ‘application/vnd.twitchtv.v5+json’  
}

This makes the entries members of an object not just an object with a string in.

The reason the first call you made works is that it does not require any headers, if you click the link you’ll get a response without using a version or Client-Id

[https://api.twitch.tv/kraken/games/top?limit=100](https://api.twitch.tv/kraken/games/top?limit=100)

Hope that helps

Adrian

---

_[View the full topic](https://discuss.dev.twitch.com/t/i-use-same-header-value-but-one-work-one-not-work/12395)._
