Visa Developer Community

Highlighted
Regular Visitor

Expected input credentials were not present

Hello, I am trying to follow the getting starting guide and I am not able to get a sucessful response.

 

When I execute the GET /vdp/helloworld end point from soapUI, it always return tom me

 

 

{"responseStatus": {
   "code": "9123",
   "severity": "ERROR",
   "info": "",
   "status": 401,
   "message": "Expected input credentials were not present"
}}

 

These are the http log

 

Tue Apr 17 12:13:05 CDT 2018:DEBUG:>> "GET /vdp/helloworld HTTP/1.1[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:>> "Host: sandbox.api.visa.com[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:>> "[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "HTTP/1.1 401 Unauthorized[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "Server: Apache[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "X-SERVED-BY: l73c035[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "X-CORRELATION-ID: 1523985185_328_86_l73c035_VDP_ARM[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "X-APP-STATUS: 401[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "X-Frame-Options: SAMEORIGIN[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "X-XSS-Protection: 1; mode=block[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "X-Content-Type-Options: nosniff[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "Strict-Transport-Security: max-age=2592000;includeSubdomains[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "Cache-Control: no-cache, no-store, must-revalidate[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "Pragma: no-cache[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "Expires: -1[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "Content-Type: application/json;charset=UTF-8[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "Content-Length: 132[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "Date: Tue, 17 Apr 2018 17:13:05 GMT[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "Connection: keep-alive[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "[\r][\n]"
Tue Apr 17 12:13:05 CDT 2018:DEBUG:<< "{"responseStatus":{"code":"9123","severity":"ERROR","info":"","status":401,"message":"Expected input credentials were not present"}}"

And these are the SoapUI log

 

 

Tue Apr 17 12:13:05 CDT 2018:DEBUG:Sending request: GET /vdp/helloworld HTTP/1.1
Tue Apr 17 12:13:05 CDT 2018:DEBUG:Receiving response: HTTP/1.1 401 Unauthorized
Tue Apr 17 12:13:05 CDT 2018:DEBUG:Connection can be kept alive indefinitely
Tue Apr 17 12:13:05 CDT 2018:DEBUG:Target requested authentication
Tue Apr 17 12:13:05 CDT 2018:WARN:Authentication error: Unable to respond to any of these challenges: {}
Tue Apr 17 12:13:05 CDT 2018:INFO:Got response for [https://sandbox.api.visa.com.Helloworld:Request 1] in 439ms (132 bytes)

I have used the Configuring a Two-Way SSL Keystore Using an Auto-generated CSR option.

When I configured the SoapUI, I provided the keystore file

myProject_keyAndCertBundle.jks

Then, I set my userName and pass in the Authorization Basic...

and when I try: 'Click Submit Request (green chevron icon below) to test your connection. If successful, you should see the current timestamp in the response panel, as shown below.' I get the error I showed you above.

 

2 REPLIES 2
Visa Dev Moderator

Re: Expected input credentials were not present

Hi adpablos,

 

In general, 401 is credential issue. We will need to identify if this is a credential issue.
Follow the steps in the developer.visa.com Getting Started guide and test whether the certificates are good.
1. Use the instruction and install the certificates. Follow exact steps.
2. Use SOAPUI and test hello world with your certs. That will tell if there is a credential issue.

 

This could also be a username and password validation issue. 
Please ensure that a correct username/password is entered in the SOAPUI basic auth screen and the raw request contains “Authorization: Basic XXXXXXXXXX” header.

 

Please make sure that you included client certificate in the key store, and that the correct key store is included in your SOAPUI project. Follow these instructions in the getting started guide step-by-step:
For openssl: “Create the PKCS12 (P12) Certificate Store Using OpenSSL.”
For java keytool: “Configuring Two-Way SSL Keystore with Java Keytool”
Double check step 3 in “Testing Two-Way SSL Connectivity using SOAPUI”

 

Furthermore, in SOAPUI please make sure that ‘authenticate preemptively’ box is checked (see ‘Pre-emptive auth’ on the same screen where you supply username and password). If this doesn’t fix the problem, please send us raw HTTP request and response (available in SOAPUI by selecting ‘RAW’ tab on both request and response).

 

Thank you,

Diana

 

Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

Thanks,
Diana

Regular Visitor

Re: Expected input credentials were not present

Thank you Diana!

I kept every steps ok from you guide but i Had not the Authenticate pre-emptively checked in SoapUi.

That solved my issue.

Thank you again.