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

261
Vistas
Unable to get data of third party API with Token attached to it in react

So I am trying to get data from a third-party API. It works on postman but I want to make a request and get the data from my to react project.

Here is the public API: https://api.securityscorecard.io/companies/okta.com where I can grab data about okta.com. and the token is Token Qit1XE1nrE1NHYfIkzHH8MGxUwUO.

It works fine on the postman. Take a look at the screenshot below.

enter image description here

How can I make a valid request to get this data in react? Here is what I tried so far.

axios({
      url: "https://api.securityscorecard.io/companies/okta.com",
      method: "get",
      headers: {
        Token: "Qit1XE1nrE1NHYfIkzHH8MGxUwUO",
      },
    })
      .then((response) => {
        console.log("okta data", response);
      })
      .catch((err) => {
        console.log(err);
      });

But It did not work. Where is my mistake here? Thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

try this:


    axios({
      url: "https://api.securityscorecard.io/companies/okta.com",
      method: "get",
      headers: {
        Authorization: "Token Qit1XE1nrE1NHYfIkzHH8MGxUwUO",
      },
    })
      .then((response) => {
        console.log("okta data", response);
      })
      .catch((err) => {
        console.log(err);
      });

about 4 years ago · Juan Pablo Isaza 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