Certificate Error

Help with HTTPS API request to TRB143 in Node-RED – Certificate Error

Hi everyone,

I’m currently trying to retrieve an API token from my TRB143 using Node-RED. The request is almost working, but I keep getting the following error:

RequestError: unable to verify the first certificate

:wrench: Setup:

  • I’m using the http request node in Node-RED to call the TRB143 API at https://<IP>/api/login.
  • The token is extracted and stored in a global variable (global.trb143.token) using a change node.
  • The device seems to respond, but the certificate error blocks the process.

:magnifying_glass_tilted_left: What I suspect:

  • The TRB143 uses a self-signed SSL certificate.
  • Node.js (used by Node-RED) cannot verify the certificate and throws an error.

:red_question_mark: My questions:

  1. Is there an official way to provide or import the TRB143’s certificate so that Node.js / Node-RED accepts it?
  2. Alternatively: Is it possible to use HTTP instead of HTTPS with the TRB143 to bypass the certificate issue?
  3. How do you usually handle API access from Node-RED to Teltonika devices when self-signed certificates are involved?

Hello,

We have official documentation posted under: https://developers.teltonika-networks.com
When it comes to API calls and such.

If you want to use HTTP instead of HTTPS, refer to the Quick Start guide here: https://developers.teltonika-networks.com/#quick-start

Certificate-related API calls, for example, can be found under here:
https://developers.teltonika-networks.com/reference/trb143/7.14.3/v1.6.3/certificates#get-certificates-config
You can read, download, generate & sign.

Regards,
M.

1 Like

Hi,
You have few choises:

  • Make certificate trusted on your pc/server. You can download it via System > Administration > Access Control page: go to https edit window and click download button at the bottom. Then make it trusted: it depends on OS also Node-RED probably can directly trust this cert (not sure).
  • You can disable https enforcement in System > Administration > Access Control page: edit https and disable Redirect to HTTPS. This should allow you to use http instead of https.
  • Most application/libs allows you to ignore ssl errors.
2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.