So I made a code to change the title of stream, using “requests” lib of python. It worked 1 time and then it stopped. I even tried signing up for new client-ID and got new token and it still doesn’t work.
It returns either “HTTPError: 401 Client Error: Unauthorized” or “HTTPError: 401 Client Error: Invalid token or missing local scope”
Here’s the code:
import requests
token = "my_token";
headers = {'Authorization':'OAuth ' + token,'Accept':'application/vnd.twitchtv.v3+json', 'Client-ID':'my_client_id'}
channel = "my_channel"
lmao = {'channel[status]' : 'lmao','channel[game]' : 'Diablo','channel[delay]' : '0'}
r = requests.put('https://api.twitch.tv/kraken/channels/my_channel', headers = headers, params = lmao).raise_for_status()
print r.content