To generate API code:
- Go to Google Developers Console and log in with your Google account.
- Create the new project (name does not matter for the plugin).
- Go to your project (by clicking on its name in the list).
- In the sidebar on the left, expand APIs & auth. Next, click APIs. In the list of APIs go to YouTube Data API (v3) and make sure that it’s enabled (Enable API).
- In the same sidebar click Credentials. Then click on Create New Key and choose Browser key.
More information on: Google Developers portal