simple-youtube-api icon indicating copy to clipboard operation
simple-youtube-api copied to clipboard

How does the API key get used?

Open preeth1 opened this issue 4 years ago • 3 comments
trafficstars

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.

preeth1 avatar Apr 12 '21 15:04 preeth1

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.

jonnekaunisto avatar Apr 13 '21 23:04 jonnekaunisto

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.

randomsnippets avatar Jul 26 '22 07:07 randomsnippets

I still dont get how to use this.

randomsnippets avatar Jul 26 '22 07:07 randomsnippets