vendredi 10 février 2017

Which type of Client ID I have to use for Web Based TV app?

Vote count: 0

I am trying to develop HTML5 based app for TV. It should use Google API. However, I am not able to pass authentication. My Client ID is generated as "Other", since it didn't feet into other categories. This is the JS code:

googleApiClientReady = function() {
    console.log('ready!!!');
    gapi.client.setApiKey(API_KEY);
    gapi.auth.init(function() {
        window.setTimeout(checkAuth, 1);
    });
}

function checkAuth() {
    console.log('checkAuth called');
    gapi.auth.authorize({
        client_id: OAUTH2_CLIENT_ID,
        scope: OAUTH2_SCOPES,
        immediate: true
    }, handleAuthResult);
}

function handleAuthResult(authResult) {
    if (authResult && !authResult.error)
    {
        console.log('auth ok');
    }
    else
    {
        console.log('auth not ok, authorizing...');
        gapi.auth.authorize({
            client_id: OAUTH2_CLIENT_ID,
            scope: OAUTH2_SCOPES,
            immediate: false
        }, handleAuthResult);
    }
}

The error I see in console:

Refused to display 'http://ift.tt/2kbNZ8D... ' frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

There were many topics about this error, where people solve it by creating proper client ID. But none of them used "Other" and I am not sure whether this is causing the error or something else.

enter image description here

asked 24 secs ago

Let's block ads! (Why?)



Which type of Client ID I have to use for Web Based TV app?

Aucun commentaire:

Enregistrer un commentaire