Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding "client_id" query string variable breaks "/stream" requests #334

Open
pBun opened this issue Mar 2, 2015 · 5 comments
Open

adding "client_id" query string variable breaks "/stream" requests #334

pBun opened this issue Mar 2, 2015 · 5 comments

Comments

@pBun
Copy link

pBun commented Mar 2, 2015

Adding the "client_id" query string variable to "/stream" requests result in a response with 0 items.

Example:
https://api.twitch.tv/kraken/streams?limit=100&offset=0&game=League%20of%20Legends&client_id=[my-client-id]&callback=JSON_CALLBACK

Removing the "client_id" variable results in a correct response:
https://api.twitch.tv/kraken/streams?limit=100&offset=0&game=League%20of%20Legends&callback=JSON_CALLBACK

Working example with the same client id:
https://api.twitch.tv/kraken/games/top?limit=100&offset=0&client_id=[my-client-id]&callback=JSON_CALLBACK

edit: removed client id

@FugiTech
Copy link
Contributor

FugiTech commented Mar 2, 2015

Seems that endpoint (/kraken/streams) interprets client_id differently than other endpoints. For now, I'd recommend not setting it for that endpoint.

@pBun
Copy link
Author

pBun commented Mar 2, 2015

My app makes a large number of /stream requests; will making all of these without a client_id be problematic?

@FugiTech
Copy link
Contributor

FugiTech commented Mar 2, 2015

If you can set it as a header, that'd be preferable.

@pBun
Copy link
Author

pBun commented Mar 2, 2015

I'm using JSONP since the requests are cross origin so I can't set the headers.

@OOWS
Copy link

OOWS commented Mar 18, 2015

The problem is that the API guidelines state "We require you to send your application's client_id with every request you make to ensure that your application is not rate limited... In situations where headers cannot be set, you can also specify a client ID as a querystring parameter: client_id=<client_id>".

Yet in GET /streams, the client ID is used as a parameter with the following effect: "Only shows streams from applications of client_id."

So the API should really change the client_id parameter name in the GET /streams so that it is distinct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants