0

I want my chrome extension to be able to get information about YouTube videos such as title, description and number of likes and use the YouTube api quota of the user for that. Can a chrome extension ask a user for permission to use his YouTube api?

If not, can a Chrome extension ask a user to enter his YouTube api key and make requests on behalf of the user?

senops
  • 31
  • 3
  • Here's a tutorial for using the YouTube Data API in a chrome extension. [How to make Chrome Extension 65 YouTube Data API](https://youtu.be/VcwXuAEEH88) – Norio Yamamoto Feb 25 '23 at 06:16
  • This video doesn't answer any of my questions. Can a chrome extension ask a user for permission to use his YouTube api? Can a Chrome extension ask a user to enter his YouTube api key and make requests on behalf of the user? – senops Feb 25 '23 at 06:43
  • An extension can automatically read the client's key from youtube site when it's shown in a tab. It's probably inside `yt` variable which you can read in [page context](/a/9517879). – wOxxOm Feb 25 '23 at 12:10
  • @wOxxOm I found `ytcfg.data_.INNERTUBE_API_KEY`, but it returns `PERMISSION_DENIED`. https://www.googleapis.com/youtube/v3/videos?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8&id=vXzp-ZofVl0&part=statistics – senops Mar 01 '23 at 19:12
  • `ytcfg.data_.LINK_API_KEY` and `ytcfg.data_.VOZ_API_KEY` do not work either. – senops Mar 01 '23 at 19:35

0 Answers0