rafy-rs icon indicating copy to clipboard operation
rafy-rs copied to clipboard

Remove API key

Open RndFooBar opened this issue 7 years ago • 4 comments

Providing you youtube API key through this crate has several disadvantages:

  • The number of API calls are limited which means that this crate won't be able to serve a large amount of users.
  • The API key is bound to your Google account, which would make you responsible for possible abuses.

I would therefore highly recommend you to remove your youtube API key from the source code and instead let the user input theirs.

RndFooBar avatar Jul 12 '17 19:07 RndFooBar

@RndFooBar I guess you're right. I'll try to parse the information from the video's HTML page itself. If that doesn't work correctly, I'll stick with having users input their own key.

ritiek avatar Jul 13 '17 12:07 ritiek

But how will Travis CI tests run?

ritiek avatar Jul 13 '17 19:07 ritiek

Travis has encryption support for things like API keys.

https://docs.travis-ci.com/user/encryption-keys/

ids1024 avatar Aug 20 '17 03:08 ids1024

@ids1024 Thanks! I didn't know about that feature in Travis CI (no pun intended) but after looking for all this while, I am not sure if I should remove the API key.

I've also noticed a lot of open-source software with embedded API keys (even official YouTube Kodi addon and many other tools using YouTube API, I am looking at you @ids1024 :smile:).

At the moment, this library does not have many users, so I am not concerned about the limited API calls and since I made a separate Google account to generate the keys used in this library, I do not really mind until somebody abuses it to the extent that they send me a notice (they will probably just ban the API key anyway).

ritiek avatar Aug 20 '17 13:08 ritiek