# Is something missing here?

**URL:** <https://forum.freecodecamp.org/t/is-something-missing-here/39716>\
**Category:** I Built This\
**Created:** [September 24, 2016, 4:48pm UTC](https://forum.freecodecamp.org/t/is-something-missing-here/39716 "2016-09-24T16:48:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gobees](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/gobees/32/13468_2.png) [@gobees](https://forum.freecodecamp.org/u/gobees)\
**Post date:** [September 24, 2016, 4:48pm UTC](https://forum.freecodecamp.org/t/is-something-missing-here/39716/1 "2016-09-24T16:48:36Z")

</div>

Before I go too far, is something important missing here:

> **[Screenshot](https://prnt.sc/clunar)**
>
> Captured with Lightshot

---

<div class="post-metadata">

**Author:** ![BenGitter](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bengitter/32/12192_2.png) [@BenGitter](https://forum.freecodecamp.org/u/BenGitter)\
**Post date:** [September 24, 2016, 5:55pm UTC](https://forum.freecodecamp.org/t/is-something-missing-here/39716/2 "2016-09-24T17:55:59Z")

</div>

Hi, it indeed seems like something is missing. It looks like they will just give you a sample response on a link that is not yet active. You can still use the Twitch API, but you will have to get a client-id. In the post beneath you can see how to add the client-id to your ajax request.

> **[Twitch API access errors](https://forum.freecodecamp.org/t/twitch-api-access-errors/38080/9)**
>
> It should work without the ID in the url. I decided to update my Twitch with a client ID and this works for me: $.ajax({ url: 'https://api.twitch.tv/kraken/channels/' + channel, headers: { "Client-ID" : "Client-ID" } }).done(function(data){ ...

---

<div class="post-metadata">

**Author:** ![KoniKodes](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/konikodes/32/158615_2.png) [@KoniKodes](https://forum.freecodecamp.org/u/KoniKodes)\
**Post date:** [September 25, 2016, 12:33am UTC](https://forum.freecodecamp.org/t/is-something-missing-here/39716/3 "2016-09-25T00:33:32Z")

</div>

I have found that you must place the client id both inside the ajax call and in the header.  
Also, remove the callback.  
Hope this helps.

---

<div class="post-metadata">

**Author:** ![BenGitter](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bengitter/32/12192_2.png) [@BenGitter](https://forum.freecodecamp.org/u/BenGitter)\
**Post date:** [September 25, 2016, 7:29pm UTC](https://forum.freecodecamp.org/t/is-something-missing-here/39716/4 "2016-09-25T19:29:50Z")

</div>

Hey, I used this code:

```
$.ajax({   
  url: 'https://api.twitch.tv/kraken/channels/' + channel,   
  headers: { "Client-ID" : "Client-ID" } 
})
.done(function(data){     
 // Or use succes
});

```

So you only need to include the client-id in the header.

---

<div class="post-metadata">

**Author:** ![KoniKodes](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/konikodes/32/158615_2.png) [@KoniKodes](https://forum.freecodecamp.org/u/KoniKodes)\
**Post date:** [September 25, 2016, 11:27pm UTC](https://forum.freecodecamp.org/t/is-something-missing-here/39716/5 "2016-09-25T23:27:49Z")

</div>

Thank you for that. I don’t know why I needed it in both locations, I’m just glad it finally works 😊

---

<div class="post-metadata">

**Author:** ![gobees](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/gobees/32/13468_2.png) [@gobees](https://forum.freecodecamp.org/u/gobees)\
**Post date:** [October 1, 2016, 9:48pm UTC](https://forum.freecodecamp.org/t/is-something-missing-here/39716/6 "2016-10-01T21:48:54Z")

</div>

i finally got it to work, removing callback, and client id only in the header.

thanks

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:06pm UTC](https://forum.freecodecamp.org/t/is-something-missing-here/39716/7 "2021-06-01T18:06:14Z")

</div>


