Estoy usando GET https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId} para obtener algunos datos de mis Hojas de cálculo de Google usando la API de búsqueda + la API de Sheet v4
let fetch_url = "https://sheets.googleapis.com/v4/spreadsheets/1UOaYEl8i33Bco5PaIXAljWkPFmt3j3i1tohXwNl3vvs?key=" + apiKey let fetch_option = { method: 'GET', headers: { Authorization: `Bearer ${accessToken}`, 'Content-Type': 'application/json' } } fetch(fetch_url,fetch_option) .then(res => function(res){ console.log(res.JSON()) })Pero he recibido 401 cuando estoy ejecutando esta función de búsqueda. ¿Puedo saber lo que me estoy perdiendo?
"permissions":[ "activeTab", "identity", "http://*/" ], "background":{ "scripts":["src/script/background.js","src/script/jsrsasign-all-min.js"], "persistent": false }, "oauth2": { "client_id": "Client ID", "scopes":["https://www.googleapis.com/auth/spreadsheets", "https://sheets.googleapis.com/v4/spreadsheets/*"] }