Skip to content

Using REST API with node-red

I try to use the REST API from node-red. When the usermanagement for the eHMI is turned off everything works fine. Now I have enabled the user management. When I send a http request to receive an authentication token, I receive a message "Error: unable to verify the first certificate". My request URL is https://192.168.178.10/_pxc_api/v1.2/auth/auth-token and the body is {"scope":"variables"}. When I enable SSL/TLS I receive a code 400 unknown command. What am I doing wrong?

Comments

  • Hello Stefan,

    is the https client enabled to accept Certificates from unknown CAs?
    I think what is stoping you here his the initial. "do you trust this Certificate"
     message that your browser will also give you when accessing the PLC.

    kind regards,
    Oliver

  • Hi Oliver,

    my client is set to not check server certificates. So this means for me that I trust the server certificates always.(see attached image)

     

     

  • Hi Stefan,

    I've absolutely no idea about Node Red, but your auth request looks fine so far.

    Maybe you can use this discussion as a reference how the authentication works in general - we will also add more details into the documentation.

    Also I've spend some minutes into google, seems that the message is not unusual (especially by using self signed certs) and that you can deactivate the checks.

    Maybe some other users have already more experiences in Node.red and can help you out here, or raise maybe a question on stackoverflow or in the node.red forum.

    Take care,

    Frank

Sign In or Register to comment.