HTTP Response 401 Unauthorized When Making HTTP Request in LabVIEW

Updated Jul 12, 2024

Reported In

Software

  • Web UI Builder
  • LabVIEW

Issue Details

When using the HTTP Client VIs in LabVIEW to send an HTTP request, I get the response 401 Unauthorized even though I have added the username and password.

Solution

The username and password added to the Open HTTP Handle.vi are not used to build the Authorization headers required to make an HTTP request to a secured endpoint. The Authorization header must be manually created and added using the Add Headers.vi.

The following screenshot shows how to manually add the Authorization credentials in the HTTP request header:

image (15).png

Attachments