Channel panel API endpoint (2016) - CORS

I once brought up this topic and got an answer that worked:

https://api.twitch.tv/api/channels/{CHANNEL_NAME}/panels?client_id={Client-ID}

But now this is not working in the browser; It worked in this desktop app that I made (using Electron). It’s the only API end point that I need that’s not a part of the Kraken API endpoints. Is there any way around this?

Is it returning something different than before or is it just straight not working in your app/browser?

I pulled up a channel just fine and it returned what I expected it to.

@piecedigital Only the endpoints under kraken are officially supported for 3rd party use. I wouldn’t expect CORS support for anything else. The endpoint does support jsonp though.

@Larklen APIs need either jsonp or CORS support in order to be consumed by javascript in a browser, which has normal security restrictions enabled.

Ah, good point! When OP said it didn’t work in browser I auto-went to try but didn’t draw the connection between Browser and CORS. I have learnt something :slight_smile:

Okay, I guess I’ll have to give JSONP a try. Never done it, though.
I thought it’d work the same as it did in electron but I guess not.

Did you try it with XHR, though? It will pull the data when using the browser exactly.

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