I have completed writing the code and I’m not getting any of the videos to display. I have went back and read thru the code and everything matches up with the video and I have even included my own API key id.
Could anyone guide me to how to get the video playlist to actually be visible to the page. The playlist link is -
The “400” hundred means that it is failing, probably something you did/didn’t do.
The response is:
{
"error": {
"code": 400,
"message": "No filter selected. Expected one of: mine, channelId, id",
"errors": [
{
"message": "No filter selected. Expected one of: mine, channelId, id",
"domain": "youtube.parameter",
"reason": "missingRequiredParameter",
"location": "parameters.",
"locationType": "other"
}
]
}
}
Do you know how to use the browser dev tools? They are one of the most important tools you have. Look into it. I use the console. network, and inspect tool all the time.
You can also get the response in the console by handling the API fail in the code, something like:
function loadVids() {
$.getJSON(URL, options, function (data) {
var id = data.items[0].snippet.resourceID.videoID;
mainVid(id);
resultsLoop(data);
})
.catch(err => console.error('Request failed:', err.responseText))
}