offish / twitchtube

Twitch YouTube bot. Automatically make video compilations of the most viewed Twitch clips and upload them to YouTube using Python 3.
MIT License
538 stars 77 forks source link

OAuth Token #6

Closed ghost closed 4 years ago

ghost commented 4 years ago

Im sorry if this is a super dumb question but I really dont understand how to get an OAuth token. When I try to use the site you mention (https://twitchapps.com/tokengen/). It wants my Client-ID and something for "scopes". I just dont know what to type in there. The other problem is that I dont know what to fill the client_secret.json with for the most part. https://prnt.sc/tnf1pp https://prnt.sc/tnf1v4

offish commented 4 years ago

You don't actually need to fill out "Scopes", just "Connect" and get your OAuth token. You're not actually expected to fill out the client secret file, this is a file given to you by the Google Cloud Platform when you've created an OAuth 2.0 Client ID. image

For the file that should look like this: "{\"token\": \"example\", \"expiry\": null, \"_scopes\": null, \"_refresh_token\": \"example\", \"_id_token\": null, \"_token_uri\": \"https://oauth2.googleapis.com/token\", \"_client_id\": \"example.apps.googleusercontent.com\", \"_client_secret\": \"example\"} I've actually forgot how to get it, but I will update the README when I've figured it out. I will also add more information under Setup, as I've received multiple questions about this.

offish commented 4 years ago

Go to Twitch Developer Console and set your redirect URL to https://twitchapps.com/tokengen/ Now you can connect and authorize with your Twitch account, and it should hopefully work. (Deleted your comment as you leaked your Client ID in your first picture)

ghost commented 4 years ago

Oh man god bless you. The second I saw your reply i felt super dumb. In the meantime I got my client secret from google aswell. The only entry thats missing in the file is redirect_uris. Do i need something special for it?

offish commented 4 years ago

Try running it without, it might work.

ghost commented 4 years ago

Im sorry for asking so much but the very last thing im missing is the refresh token inside the credentials.json and I really cant find where to get it.

offish commented 4 years ago

I will try to figure out how I got it, can't remember at the moment.

ghost commented 4 years ago

Alright hope you find something but still big thanks

offish commented 4 years ago

Never mind I'm retarded. Delete the whole credentials folder with the file inside and just run it. It should create the folder and file automatically. Pushing some changes to README now so it will be easier to setup for others.