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

573
Visualizações
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
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