Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

edit_channel returns 500 server error #21

Open
travisdmathis opened this issue Apr 25, 2016 · 1 comment
Open

edit_channel returns 500 server error #21

travisdmathis opened this issue Apr 25, 2016 · 1 comment

Comments

@travisdmathis
Copy link

it looks like you're no longer passing the access_token in a way that agrees with the twitch api..

twitch = Twitch.new(access_token: user.access_token, client_id: Rails.application.secrets.twitch_id, secret_key: Rails.application.secrets.twitch_token, scope: ["channel_editor"], redirect_uri: "http://localhost:3000/users/auth/twitchtv/callback")

twitch.edit_channel "HuntingtonGames", "Test", "Creative"
=> {:body=>#@response=#, @headers={"accept-ranges"=>["bytes"], "age"=>["0"], "content-type"=>["text/html; charset=utf-8"], "date"=>["Sun, 24 Apr 2016 15:31:14 GMT"], "server"=>["nginx"], "status"=>["500 Internal Server Error"], "via"=>["1.1 varnish"], "x-mh-cache"=>["rails-varnish-aws-e1b6bb3b; M"], "x-request-id"=>["44d7bc26f3475ef14e9791fd823aa342"], "x-varnish"=>["2229646377"], "content-length"=>["0"], "connection"=>["Close"]}>, :response=>500}

DallasNChains Twitch Staff:
One thing I don't see here is the access token for the API calls. Make sure you're requesting that and passing it along to API. You'll need to reach out to the creator of the Ruby package for any support with how they implemented that.

@TopOneOfTopOne
Copy link

It seems this issue occurs when Twitch::Request#put is called along with data argument but there is no issue when data argument is not passed. Perhaps this arises from the way we use httparty adapter?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants