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

How does the API key get used? #38

Open preeth1 opened 3 years ago

preeth1 commented 3 years ago

The docs explain how to download an api key, but then all the examples just use a credentials.json file, which are two different things. I am not sure how to get started with this.

If this is correct, you should have similar instructions that this library uses: https://github.com/tokland/youtube-upload/blob/master/README.md#setup I followed that, and now get the error credentials.storage: No such file or directory This library seems really great, but these things need to be explained in the docs to make it usable.

jonnekaunisto commented 3 years ago

Yeah the docs have a lot of room to improve

I believe you are trying to upload a video or do something with user data.

https://github.com/jonnekaunisto/simple-youtube-api/blob/master/README.rst#generating-youtube-api-keys Check the "For user data" section here. So from that step you should get a "client_secret.json" file. You put that as the client_secret here: https://github.com/jonnekaunisto/simple-youtube-api/blob/master/simple_youtube_api/channel.py#L78

Then for the credentials.storage you have to put a path to the file where you want the credentials to get stored. For the first time when you login it will open the web browser and make you login into the account. After going through that flow the credentials.storage will get saved into your local and all of the other times you login it will use that.

Feel free to create a PR to update any of the docs if you want.

BlueSchnabeltier commented 2 years ago

Yeah the docs have a lot of room to improve

I believe you are trying to upload a video or do something with user data.

https://github.com/jonnekaunisto/simple-youtube-api/blob/master/README.rst#generating-youtube-api-keys Check the "For user data" section here. So from that step you should get a "client_secret.json" file. You put that as the client_secret here: https://github.com/jonnekaunisto/simple-youtube-api/blob/master/simple_youtube_api/channel.py#L78

Then for the credentials.storage you have to put a path to the file where you want the credentials to get stored. For the first time when you login it will open the web browser and make you login into the account. After going through that flow the credentials.storage will get saved into your local and all of the other times you login it will use that.

Feel free to create a PR to update any of the docs if you want.

The Docs are practicly not there.

BlueSchnabeltier commented 2 years ago

I still dont get how to use this.