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

264
Vistas
Doing a basic auth req but getting 401
    let headers = new Headers()
    credentials = btoa(userName + ":" + password)
    headers.append("Authorization", "Basic " + credentials)
fetch("https://pikaso.me/api/v1/tweet?tweet_id=1468971637223555074", {}, {
    'method':'GET'
    headers:headers
})

    .then(res => res)
    .then(data => console.log(data))

Doing this gives a 401 error stating invalid credentials. Using pikaso API refer docs to https://pikaso.me/api

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

You should pass the headers and method as the second argument to fetch. Right now, you're passing an empty object as the second argument, and the headers and method as the third.

Try this instead:

fetch("https://pikaso.me/api/v1/tweet?tweet_id=1468971637223555074", {
    'method':'GET',
    headers:headers
})

See the documentation for the fetch function.

about 4 years ago · Santiago Gelvez Denunciar
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