Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

260
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda