Message Level Encryption - Expected input credential was not present

Solved! Go to solution
johanl
Regular Visitor

Message Level Encryption - Expected input credential was not present

I'm trying to implement MLE from C#, and I keep getting "Expected input credential was not present".

My request header has the following keys:
- Authorization: Basic RkQ0NURRRjBTM0c4OTM1Q0hLSlcyMXJMdEw5Y3E3eTdlcHpPOG1nb3RXZWx3cDNuazp1M0JkSFNCOVJ3T0xTNUJwOVNiOXMyNndZd1BDQTVHT3I4NQ==

- Accept: application/json

- keyId: 30cddaa3-9de9-431e-94d0-9f1eb293058d

 

My request body is built with the following code (found in the forums):

string token = Jose.JWT.Encode(
payload: payload,
key: publicKey,
alg: Jose.JweAlgorithm.RSA_OAEP_256,
enc: Jose.JweEncryption.A128GCM,
extraHeaders: new Dictionary<string, object>
{
{ "kid", "30cddaa3-9de9-431e-94d0-9f1eb293058d" },
{ "iat", new DateTimeOffset(DateTime.UtcNow).ToUnixTimeMilliseconds() }
});

 

If I don't use MLE, my credentials work perfectly, so I don't think it's got something to do with incorrect credentials.

What else can I look at?

 

1 REPLY 1
SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: Message Level Encryption - Expected input credential was not present

Hi @johanl,

Which API are you using? If MLE is optional for the API and you have enabled it, please ensure that you have generated the MLE key-ID, certificate private key, and server and client encryption certificates. You'll also need to add the keyId as an additional HTTP header in your code. Please reference the Message Level Encryption Guide for details.

 


Best,
Stacey

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