twitch-api

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

Getting User profile connections with a bot account

点点圈 提交于 2019-12-25 00:26:45
问题 I'm trying to add a feature to my Discord bot: when my Twitch account gets a new follower, and if the follower's Twitch account is linked to his Discord account, when he gets into my server he's getting automatically a new role. So my question is: can I get the Discord's linked apps of a user, and get the user ID linked to those apps? Like getting the Twitch's user ID of the new follower and compare it with with the Discord's linked Twitch user ID of the users of my channel using Discord.js?