Open marcfon opened 7 years ago
These are the steps I've used to get the authentication credentials:
curl -d "client_id=YOUR_CLIENT_ID_FROM_STEP_1&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.readonly" https://accounts.google.com/o/oauth2/device/code
curl -d "client_id=YOUR_CLIENT_ID_FROM_STEP_1&client_secret=YOUR_CLIENT_SECRET_FROM_STEP_1&code=YOUR_DEVICE_CODE_FROM_STEP_2&grant_type=http://oauth.net/grant_type/device/1.0" -H "Content-Type: application/x-www-form-urlencoded" https://www.googleapis.com/oauth2/v4/token
https://www.googleapis.com/youtube/v3/channels?access_token=YOUR_ACCESS_TOKEN_FROM_STEP_5&part=snippet&mine=true
curl -d "client_id=YOUR_CLIENT_ID_FROM_STEP_1&client_secret=YOUR_CLIENT_SECRET_FROM_STEP_1&refresh_token=YOUR_REFRESH_TOKEN_FROM_STEP_5&grant_type=refresh_token" -H "Content-Type: application/x-www-form-urlencoded" https://www.googleapis.com/oauth2/v4/token
This current pull requests breaks backwards compatibility. Let me what you think is the best way to fix this.
I've implemented OAuth2 support because it's needed te access certain information like the most recent subscribers to a YouTube channel.