Hakkin / twitchpipe

Pipe your favorite Twitch streams to the media player of your choice, or a file to save them for later. Supports low-latency playback.
MIT License
35 stars 5 forks source link

Client-id error and workaround #2

Closed KauzDs closed 4 years ago

KauzDs commented 4 years ago

the script doesn't work currently (can't get the user_id) because twitch is being twitch. The work around is instead of using "Client-ID: xxxxxxxxxxx" use "Authorization: OAuth xxxxxxxxxxx" and it'll spill out he user_id like it should.

get_id () {
  curl --silent --fail -H "Authorization: OAuth xxxxxxxxxxxxxx" "$API_URL$1" | jq -r ._id
}
Hakkin commented 4 years ago

It's interesting that using Client-ID fails for you, this is Twitch's own client ID that they use on their website. I wonder if this is a region block or something?

The problem with using OAuth is it's a private token for your account, so each user would have to provide it themselves, which isn't very user friendly.

Can you post the output of curl --silent -i -H "Client-ID: jzkbprff40iqj646a697cyrvl0zt2m6" https://api.twitch.tv/kraken/channels/forsen

Hakkin commented 4 years ago

It seems like Twitch may have actually changed their internal Client-ID, you could also try kimne78kx3ncx6brgo4mv6wki5h1ko as a Client-ID and see if that works for you.