Youtube Analytics API 403 error

前端 未结 3 1017
半阙折子戏
半阙折子戏 2020-12-19 15:13

Hello i Would like to know somethink.

i follow the steps on the website https://developers.google.com/youtube/analytics/v1/sample-application#Enable_Authentication

3条回答
  •  无人及你
    2020-12-19 15:31

    I had the same issue while using the youtube data api v3.

    Just follow the steps :

    1. make sure u change the checkAuth() and replace immediate:false. This will be a good way to debug your code.(thats what happened i my case). Also make sure the required APIS are set to ON in google developers console.
    function checkAuth() {
     gapi.auth.authorize({
     client_id: OAUTH2_CLIENT_ID,
     scope: OAUTH2_SCOPES,
    immediate: false
    }, handleAuthResult);
    }
    

    Once step 1 is followed u might get an error of unknow_client(thats the core issue actually)

    2 So go to google developers console.For your project go to APIs and Auths>Consent screen> and provide the email address and product name.

    3 Save it. Now try executing the code.

提交回复
热议问题