jonnekaunisto / simple-youtube-api

Object-oriented Wrapper for Youtube API in Python
https://simple-youtube-api.rtfd.io
Other
74 stars 16 forks source link

problem on channel.login("client_secret.json", "credentials.storage") #14

Closed robbiedood closed 4 years ago

robbiedood commented 4 years ago

Hi jonnekaunisto,

In the example_youtube_upload.py, there two required input: i) "credentials.storage": it needs storage_path, however, what's the path, any example ? ii) "client_secret.json": I believe it is the local path of a json file about OAuth 2.0 Client IDs. Any specific type, e.g. web application or desktop app, is required ?

Hope to hear your expertise. Thank you !

jonnekaunisto commented 4 years ago

i) The credentials.storage is the file where the login will be saved. So the first time you login it will prompt you to open your browser and make you login to your account to authenticate, then the credentials.storage file will be created in the path that you've specified. The next time you try to login, the credentials.storage will be used instead of needing to login through the browser.

ii) I think Web Client should work, but if it doesn't you can also create "other" by clicking on "Help me choose", "Other UI" and "User Data".

robbiedood commented 4 years ago

Thanks for your reply. I am getting closer. The latest issue I got is from redirect url. I set it to http://localhost:8080 (and javascript_origins is http://localhost) but it would cause error message during loging: Error 400: redirect_uri_mismatch The redirect URI in the request, http://localhost:8080/, does not match the ones authorized for the OAuth client.

I was wondering what is your setting to make it working ?

Thank you !

robbiedood commented 4 years ago

Get login working now by setting http://localhost:8080/ '/' cant be dropped :) , and javascript_origins is http://localhost)

Thanks for your reply. I am getting closer. The latest issue I got is from redirect url. I set it to http://localhost:8080 (and javascript_origins is http://localhost) but it would cause error message during loging: Error 400: redirect_uri_mismatch The redirect URI in the request, http://localhost:8080/, does not match the ones authorized for the OAuth client.

I was wondering what is your setting to make it working ?

Thank you !