У меня проблема как в названии.Я вхожу в oauth2, и Google возвращает ошибку
"Невозможно прочитать электронные таблицы свойств неопределенных".Я попытался скопировать образец со страницы Google и ту же ошибку;
function makeApiCall() {
var spreadsheetBody = {
// TODO: Add desired properties to the request body.
};
var request = gapi.client.sheets.spreadsheets.create({}, spreadsheetBody);
request.then(function(response) {
// TODO: Change code below to process the `response` object:
console.log(response.result);
}, function(reason) {
console.error('error: ' + reason.result.error.message);
});
}
function initClient() {
var SCOPE = 'https://www.googleapis.com/auth/spreadsheets';
gapi.client.init({
'apiKey': 'myke',
'clientId': 'myclientID',
'scope': SCOPE,
// 'discoveryDocs': ['https://sheets.googleapis.com/$discovery/rest?version=v4'],
}).then(function() {
gapi.auth2.getAuthInstance().signIn();
gapi.auth2.getAuthInstance().isSignedIn.listen(updateSignInStatus);
updateSignInStatus(gapi.auth2.getAuthInstance().isSignedIn.get());
});
}
function updateSignInStatus(isSignedIn) {
if (isSignedIn) {
makeApiCall();
}
}
gapi.load('client:auth2', initClient);