I'm getting this error in my code, when working with the YouTube API. This code worked previously and nothing has changed about my code. I get this error:
Failed to load resource: the server responded with a status of 404 ()
https://content-youtube.googleapis.com/static/proxy.html?usegapi=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en.myOGgYJo9ys.O%2Fam%3DwQE%2Fd%3D1%2Fct%3Dzgms%2Frs%3DAGLTcCMR2Cg_3Iqxcgmos-E9G6cjWQG_Kw%2Fm%3D__features__#parent=https%3A%2F%2Fcreatorinventory.com&rpctoken=657579414
I get this error after successfully signing in with oauth2 and calling the api. This is some of my code:
function handleClientLoad(){
gapi.load('client:auth2', initClient);
}
function initClient(){
gapi.client.init({
discoveryDocs: DISCOVERY_DOCS,
clientId: CLIENT_ID,
scope: SCOPES
}).then(() => {
// Listen for sign state changes
gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);
// Handle initial sign in state
updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());
authorizeButton.onclick = handleAuthClick;
signoutButton.onclick = handleSignouClick;
});
}
function updateSigninStatus(isSignedIn)
{
if(isSignedIn){
//Update UI
signinCont.style.display = 'none';
signoutButton.style.display = 'block';
loading.style.display = 'block';
//get Channel
gapi.client.youtube.channels.list({
"part": [
"snippet,contentDetails,statistics"
],
"mine": true
})
.then(async function(response) {
// Handle the results here (response.result has the parsed body).
channel_id = response.result.items[0]['id'];
}
function(err) { console.error("Execute error", err); });
}
function handleAuthClick(){
gapi.auth2.getAuthInstance().signIn();
}
My code has worked previously, but now isn't. I don't believe I've changed anything. Could it be an issue on Google/YouTube's end?