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

447
Visualizações
Javascript API Error: ERR_CERT_AUTHORITY_INVALID

I'm looking to build a banking/budgeting app to use myself/use for a portfolio project. I am relatively new to using API's but have been learning Javascript/HTML/CSS fr around a year now.

I know this questions has been asked many times on here, but none of the responses seem to help my situation.

Iam trying to retrieve some bank account information using Natwest's Bank of API's - https://developer.sandbox.natwest.com/api-catalog/1735631/getting-started They allow you to generate a test App to test the API with some mock values.

I managed to achieve the responses successfully using terminal and curl, following the pages suggestions, but when translating this to Javascript I have been getting nowhere.

I am trying to get the first response, and get the above error. I have installed mkcert, to generate a trusted SSL - which appears to have been successful: enter image description here

I am using http-server, which initially generates a server hosted on: https://127.0.0.1:8081/, bringing up an error: ERR_CERT_COMMON_NAME_INVALID. I change this to https://localhost:8080, and this error is resolved.

Is this an error with Natwest not allowing a response or is the problem on my end?

Thanks in advance!

const CLIENT_ID = "dT03BZM7QTxKPsbrh4jkj09UO-D5tgpJc_8sG8VLyi8=";
const CLIENT_SECRET = "KdARr1dBr6r0fFjIB5246OQSLEGhzYB8EpHgQDaKgxw=";

fetch("https://ob.sandbox.natwest.com/token", {
  body: `grant_type=client_credentials&client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&scope=accounts`,
  headers: {
    "Content-Type": "application/x-www-form-urlencoded",
  },
  method: "POST",
})
  .then((response) => console.log(response))
  .catch((error) => console.log(error));

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