Re: Code 9124: Expected input credential was not present

Solved! Go to solution
jimbo
Regular Visitor

Code 9124: Expected input credential was not present

I have read every community question and response relating to this issue and am unable to resolve the issue.

 

My application is developed in C# using the sample application https://github.com/visa/SampleCode/tree/master/vdp-c-sharp

 

I followed this guide to create my P12 file:

https://github.com/visa/SampleCode/tree/master/vdp-c-sharp#usage

 

My request:

POST https://sandbox.api.visa.com/forexrates/v1/foreignexchangerates HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sandbox.api.visa.com
Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ex-correlation-id: TNCCYZ0OTEB0_SC
Content-Length: 98
Connection: Keep-Alive

{
"destinationCurrencyCode": "USD",
"sourceAmount": 99.99,
"sourceCurrencyCode": "GBP"
}

Server response:

HTTP/1.1 400 Bad Request
Server: Apache
X-SERVED-BY: l73c002
X-CORRELATION-ID: 1530083786_691_84_l73c002_VDP_ARM
X-APP-STATUS: 400
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=2592000;includeSubdomains
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: -1
Content-Type: application/json;charset=UTF-8
Content-Length: 130
X-Cnection: close
X-Cnection: close
Date: Wed, 27 Jun 2018 07:16:26 GMT
Connection: close

{"responseStatus":{"code":"9124","severity":"ERROR","message":"Expected input credential was not present","info":"","status":400}}

Any assistance or trace information would be greatly appreciated.

3 REPLIES 3
jimbo
Regular Visitor

Re: Code 9124: Expected input credential was not present

Further to the above information, using my P12 certificate and spoofing my request in SOAPUI I get a successful response which indicates that my issue is something to do with the HttpWebRequest object not sending the certificate back to Visa at the correct time?

jimbo
Regular Visitor

Re: Code 9124: Expected input credential was not present

Naughty Fiddler! I'm using Fiddler to inspect traffic, which interrupts the 2 Way Authentication and causes this error. As soon as I turn proxying off, the request succeeds.

 

There is an article on how to instruct Fiddler to reply with the client certificate when required here

https://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/RespondWithClientCert

API_Products
Visa Developer Support Specialist

Re: Code 9124: Expected input credential was not present

Hi @jimbo,

 

Thanks for letting us know how you resolved the issue!




Thanks,

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.