Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/443.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript YouTube数据API v3“;未能加载资源:服务器以404()的状态响应;_Javascript_Youtube Data Api - Fatal编程技术网

Javascript YouTube数据API v3“;未能加载资源:服务器以404()的状态响应;

Javascript YouTube数据API v3“;未能加载资源:服务器以404()的状态响应;,javascript,youtube-data-api,Javascript,Youtube Data Api,在使用YouTube API时,我的代码中出现了这个错误。这段代码以前工作过,我的代码没有任何变化。 我得到这个错误: 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%3Do

在使用YouTube API时,我的代码中出现了这个错误。这段代码以前工作过,我的代码没有任何变化。 我得到这个错误:

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
在使用oauth2成功登录并调用api后,我出现了此错误。这是我的一些代码:

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();
}


我的代码以前可以工作,但现在不行。我不相信我改变了什么。这可能是谷歌/YouTube的问题吗?

是的,这个问题完全站在他们这边,目前我在这里面临同样的问题