Twitch Edit Channel End Point Returns Internal Server Error 500

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=>#<HTTParty::Response:0x10 parsed_response=nil, @response=#<Net::HTTPInternalServerError 500 Internal Server Error readbody=true>, @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}

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.

edit: ohh i see, its not in the header… i’ll just fix the ruby gem myself… thanks for the tip dallas!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.