Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

119
Vistas
Fetching Google Sheets API v4 receives 401

I am using GET https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId} to get some data from my Google Sheets by using fetch API + Sheet v4 API

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())
    })

But I have received 401 when I am running this fetch function. May I know what am I missing?

"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/*"]
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda