The documentation shows that you should be able to do the following and get multiple channels data return. Now I’m getting error ‘Bad Request’ with message ‘Unparsable request body’. This was working until Thursday between 2:53 and 2:58 pm, Central Time.
>>> headers = {'content-type': 'application/json', 'Client-ID': 'my_api_key'}
>>> res = requests.get(url, headers=headers).json()
>>> res
{u'status': 400, u'message': u'Unparsable request body', u'error': u'Bad Request'}
You can still hit the ‘https://api.twitch.tv/kraken/streams/channel_name’ however that pulls only an individual channel and is very inefficent.
Did this endpoint change and is there a new way to get multiple channel data in a single request?
Thanks.
Edit:
Additional oddities:
Send the headers with my api key, along with api key in the url, get same error.
>>> url = 'https://api.twitch.tv/kraken/streams?channel=drlupo,kjhovey&client_id=my_api_key'
>>> res = requests.get(url, headers=headers).json()
>>> res
{u'status': 400, u'message': u'Unparsable request body', u'error': u'Bad Request'}
Send the request with my api key in the url, omitting the headers, it works fine.
>>> url = 'https://api.twitch.tv/kraken/streams?channel=drlupo,kjhovey&client_id=my_api_key'
>>> res = requests.get(url).json()
>>> {u'_total': 2, u'streams': ...
TL;DR - If I remove my API Client ID from the headers, and add it to the url, I can request multiple channels at the same time. If I put the Client ID in the header only, unable to get multiple channels data.