Bad Request - Required request header 'keyId' for method parameter type String is not present

dearsina
New Contributor

Bad Request - Required request header 'keyId' for method parameter type String is not present

Hello,

I'm developing an API connection to the /vmss/v2/searchTerminatedRequest endpoint. I followed the instructions to set up two-way SSL authentication and when I use Postman to GET the https://sandbox.api.visa.com/vdp/helloworld endpoint, I get a successful response.

 

However, when I use Postman to POST the searchTerminatedRequest using the sample payload, I get the following 400 error.

 

{
    "responseStatus": {
        "statusCode": "API001",
        "statusDescription": "Bad Request - Required request header 'keyId' for method parameter type String is not present"
    }
}

 

 

 

 What am I missing that allows for a successful call to helloworld, but not to the searchTerminatedRequest endpoint?

Untitled.png
5 REPLIES 5
jenn_kh
Community Moderator

Re: Bad Request - Required request header 'keyId' for method parameter type String is not present

Hi @dearsinaThank you for reaching out. One of our agents is looking into this and will get back to you soon. Until then, if any community member knows a solution, please feel free to reply to this thread.

API_Products
Visa Developer Support Specialist

Re: Bad Request - Required request header 'keyId' for method parameter type String is not present

Hi @dearsina,

 

Please refer to the Error Codes page for cause and resolution page.  




Thanks,

Diana H.



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

jtang
Helper

Re: Bad Request - Required request header 'keyId' for method parameter type String is not present

I'm having the exact same problem. What was the specific issue with the input in this case? The only place the Error Codes document refers to "keyId" is under status code 401 Unauthorized whereas this issue is status code 400.

jtang
Helper

Re: Bad Request - Required request header 'keyId' for method parameter type String is not present

Found it, the VMSS APIs all require Message Level Encryption (MLE) i.e. https://developer.visa.com/pages/encryption_guide. Would someone from Visa be able to update the VMSS docs or in the 400 section of the Error Codes doc to mention this somewhere? I had to find it through 

jtang
Helper

Re: Bad Request - Required request header 'keyId' for method parameter type String is not present

Sorry, sent too early - Cont.

I had to find it through the Project page with the message: 

"Message Level Encryption is an optional service for some of the APIs in your project and may be enforced or not via the toggle controls in the table below, however, MLE may be required for Going Live. If you have any questions, check our Message Level Encryption Guide for answers or contact developer@visa.com."

 

Seems that both myself and at least one other party did not notice it the first time around so maybe a mention somewhere in the VMSS docs would be nice.