<(UFT) Support tip> API request with Basic Authentication returns status code 401 (Unauthorized)
If you are getting this "Unauthorized" response message and you're completely sure you set the correct username and password, then you may want to check this out.
First of all, where do we configure the user and password information for Basic Authentication on UFT? Well, when working with HTTP request activities, go to Properties pane> General tab:
If you're working with a SOAP request activity, then you need to go to Properties pane> Security tab:
On both scenarios, we have the option "Use preemptive authentication". If we enable this option, UFT will send authentication information without waiting for an authentication challenge. Again, this is for scenarios where we are sure that the credentials we are using are correct but still are not working or when you're already aware that your Web Service/Server won't send an authentication challenge.
Hope you find this support tip helpful!