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

563
Views
An Authentication object was not found in the SecurityContext, an error with fetch request

I'm trying to call to an API endpoint using cURL and fetch(JavaScript), as it works fine with cURL where it's equal fetch doesn't.

Here is the cURL request:

curl -i -L -H 'Accept: application/json' --data 'client_id=[ID]&c
lient_secret=[SECRET]&grant_type=authorization_code&red
irect_uri=[REDIRECT_URI]&code=[CODE]' https://orcid.org/oauth/token

Where fetch:

 fetch("https://orcid.org/oauth/token", {
        method: "POST",
        headers: {
          Accept: "application/json",
        },
        body: `client_id=[ID]&c
lient_secret=[SECRET]&grant_type=authorization_code&red
irect_uri=[REDIRECT_URI]&code=[CODE]`,
      })
        .then((res) => res.json())
        .then((data) => {
          console.log(data);
        })
        .catch((error) => console.log(error));

ERROR:

www-authenticate: Bearer realm="orcid", error="unauthorized", error_description="An Authentication object was not found in the SecurityContext"
about 4 years ago · Juan Pablo Isaza
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!