Twitch API - Why am I not getting a successful callback?

Twitch API - Why am I not getting a successful callback?
0

#1

Hi All,

I have been trying to get a successful callback to the Twitch API for the stream information of freecodecamp, but I keep hitting a brickwall.

I am using my endpoint as https://wind-bow.gomix.me/twitch-api/streams/freecodecamp, but no luck.

What am I doing wrong?

My codepen link: https://codepen.io/yjaved/pen/BdXXxN?editors=1111

Cheers,
Yosef


#2

You have a typo. datatype should be dataType


#3

Thanks for catching that, but it still didn’t seem to fix anything.


#4

Wait! I changed it to jsonp and now everything is good!


#5

It was most likely an issue with HTTP/HTTPS compatibility. Codepen is HTTPS and that causes problems with some APIs.