Код: Выделить всё
postResURL = https://sheets.googleapis.com/v4/spreadsheets/${SHEET_ID}/values/Reserved!B2:D7:append?valueInputOption=RAW&key=${API_KEY}
Код: Выделить всё
const newRow = [[Date.now().toString(), 'xxx@gmail.com', 'some u']];
$.post({
url: postResURL, contentType: 'application/json', data: JSON.stringify(newRow),
}).done(function(response) {
if (response.updates) {
console.log('Row added successfully:', response);
} else {
console.error('Error adding row:', response);
alert('Error adding row.');
}
Код: Выделить всё
{
"error": {
"code": 403,
"message": "Method doesn't allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.",
"status": "PERMISSION_DENIED"
}
}
Подробнее здесь: https://stackoverflow.com/questions/787 ... y-code-403
Мобильная версия