How to fix “Bad Request”,“status”:400"

眉间皱痕 提交于 2020-01-06 07:01:30

问题


I try to get twitch api with following website https://api.twitch.tv/kraken/streams/ chennal name ,but nothing happened and get error {"error":"Bad Request","status":400,"message":"No client id specified"}

I expect to get viewers count and follower count


回答1:


it's necessary to include your client ID with the request. For example:

curl -H 'Accept: application/vnd.twitchtv.v5+json' \
    -H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
    -X GET 'https://api.twitch.tv/kraken/streams/44322889'

See here for details on setting up your client ID.



来源:https://stackoverflow.com/questions/57893620/how-to-fix-bad-request-status400

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!