Reputation: 57
My script is the same as https://github.com/youtube/api-samples/pull/45/commits/e5ec5453233c287cbfe1ecd296ae0ed18c4ce523 (written in Python) where I specified the CLIENT_SECRETS_FILE = "client_secret_xxx.com.json"
The client secret is created under OAuth 2.0 client IDs as "other". When I run it, it throws the following error: This site can’t be reached The connection was reset. ERR_CONNECTION_RESET While the url is http://localhost:8080/?code=4/Wulz_B8fgMauanVxtPocdgwE1sNndZZe6BGrVLI7wLU#
Any idea what is causing the error?
Upvotes: 0
Views: 278
Reputation: 57
When running the script, execute python file_name.py --noauth_local_webserver. Here are the steps:
1) Execute “python youtube_api.py --noauth_local_webserver” It will show you a long URL
2) Copy that URL and open in a browser
3) It will ask you to login on your Google account and pick the channel
4) It will show you a “Verification Code” (something like 4/j6KgOnbVU08kbBpi-GVOq9D6p-Vm6inOQUOJiTYWQqs)
5) Copy Verification Code and paste within the EC2 window. Click Enter You're done. From now on it will execute whatever parameters you indicate within the script
Upvotes: 1
Reputation: 17651
According to Youtube guide, you should choose an oauth type "Web application" not "other".
After that you also need to authorize your origin, in this case your local server URL, http://localhost:8080.
Moreover, don't forget to specify your redirect URIs, in your case, http://localhost:8080/oauth2callback in the Google Dev Console.
Upvotes: 0