How to get the channel_editor (dont mine)

Hey. I did not understand how to get the channel_editor token in my program if I know the channel_id and oauth token another user

Hi. Channel_id is equal to User_id so what you need to do is make a request to
https://api.twitch.tv/kraken/users?login=” + channel_name
with your Client_id from your registered application in the header.
Then, parse the json data returned and check for [‘users’][0][’_id’].

Check this for more.

I made a mistake in the matter. I need to get a Channel_editor token, but I know Channel_id(User_id) and oauth token another user/ I have Clien_id and Client_secret

Have you checked this?
There’s everything you have to know.

Okay. How can I update it without asking the user again?

Like this.

What am I doing wrong?
url = “https://api.twitch.tv/kraken/
x = str(“OAuth”) + str(access token)
params = {‘Authorization’: x}
data = urllib.urlencode(params)
req = urllib2.Request(url, data)
print req

And what is access token?

Can you write a piece of code with an automatic receipt of a channel_editor token on Python or another programming language?

I suggest you o read all the docs, expecially this and the “Getting tokens” section: everything will be clearer after reading all of this.

Anyway, I’ll try to provide you a pseudo-code of what you’re supposed to to asap.

Meanwhile, you should try to print some useful informations, like the response code of the request in order to understand what you’re doing wrong.

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