I am following the Modern Redux With React tutorial and trying to access the Youtube v3 data API, but in the Chrome console I get a Google Maps API warning: NoApiKeys . I'm not sure why I get a Google Maps warning because I registered an API key for Youtube.
Click Go To Credentials.

Click the API Key.

Click Browser.

Specify a name and click the Create button.

The copied and pasted API in the JS file.

import React, {Component} from 'react'; import * as ReactDOM from "react/lib/ReactDOM"; import YTSearch from 'youtube-api-search'; import SearchBar from './components/search_bar'; const API_KEY = 'AIzaSyD9WN2t4lhIZ5Es34jwaerM98r2nSutLJs'; class App extends Component { constructor(props) { super(props); this.state = {videos: []}; YTSearch({key: API_KEY, term: 'surfboards'}, (videos) => { console.log(data); this.setState({videos}); }); } render() { return ( <div> <SearchBar /> </div> ); } } ReactDOM.render(<App />, document.querySelector('.container'));
source share