Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

252
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!