Search by channels/games.. not working?

Hi,I’m a newbie.Please forgive me about my bad English.
In my project,when I try to getJSON with url:

https://api.twitch.tv/kraken/search/channels?query=starcraft?client_id=lls1bx3zba72b4sb7b7q

it not working and i got 400 error but when i try to use curl with format :

curl -H ‘Accept: application/vnd.twitchtv.v5+json’
-H ‘Client-ID: lls1bx3zba72b4sb7b7q…’
-X GET ‘https://api.twitch.tv/kraken/search/channels?query=starcraft

i successful got response.
Any advice will be appreciated.Thank you.

? starts the query parameters, the rest are separated using &.

https://api.twitch.tv/kraken/search/channels?query=starcraft&client_id=lls1bx3zba72b4sb7b7q.....
                                                           ^^^
3 Likes

yup exactly how @3ventic said it. The ? starts the query parameters then after if there are any paramters left you seperate them using &. You have two ? which will cause an error.

1 Like

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