I am trying to get the key and show the result on console but its not working. I am using React.js for this purpose.
import axios from "axios";
const KEY = "MY_Key Here";
export default axios.create({
baseURL: "https://www.googleapis.com/youtube/v3",
params: {
part: "snippet",
maxResults: 5,
key: KEY,
},
});
and App.js contain this
onTermSubmit = async (term) => {
const response = await youtube.get("/search", {
params: {
q: term
},
});
console.log(response);
};
Everytime i execute this it says "the request is missing valid api key" domain="Global" reason-"forbidden" and status="Denied".