developers
Helper

MLE token validation failed with 401

Hi,

I'm currently implementing QR receiving side API in a sandbox, I have tried to follow and use java resources found from your repository,  but I don't know what I'm doing wrong with certificates I guess but I end up getting below response 

{"responseStatus":{"status":401,"code":"9210","severity":"ERROR","message":"Token validation failed","info":""}}.

I have tried to use this video for guidance from the visa community.

https://community.developer.visa.com/t5/Webinars/Visa-Developer-Webinar-on-How-to-Implement-Message-...

 

5 REPLIES 5
SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: MLE token validation failed with 401

Hi @developers,

 

Can you please try to make an API request to GET https://sandbox.api.visa.com/vdp/helloworld to test connectivity first?

 

Please also provide the following details so we may troubleshoot further. Thanks.

 

  1. End Point URL
  2. Request Header
  3. Request Body
  4. Response Header (include the x-correlation-id)
  5. Response Body

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.
chambofadhili90
New Contributor

Re: MLE token validation failed with 401

Hi Stacey,

HTTP GET call to https://sandbox.api.visa.com/vdp/helloworld is working, find the response that I'm getting below

{
    "timestamp""2021-04-08T05:05:04",
    "message""helloworld"
}

End Point URL -->  https://sandbox.api.visa.com/visadirect/fundstransfer/v1/pushfundstransactions

 

Request Header -- > keyId = df2bea23-1807-4746-9ec7-08edca895b53

                             ---->Authorization = Basic NjczRDhVV0dTNEU4R1NPMzFRVDAyMUVPWTE0Z2lJN1REN2RuRTVhdm9mTEZBYkJVZzpxRTJ0cXFoRTNuWUFadG9YdmxPNUh4cjlqRDVTN29t

                          ----> Content-Type = application/json

 

 

Request Body --->  {"encData":"eyJlbmMiOiJBMTI4R0NNIiwiaWF0IjoxNjE3ODU5NTEzOTIyLCJhbGciOiJSU0EtT0FFUC0yNTYiLCJraWQiOiJkZjJiZWEyMy0xODA3LTQ3NDYtOWVjNy0wOGVkY2E4OTViNTMifQ.Ql3JVo9t6XK1GaryB0PcyG_EuujQsxL3HPC6VHnwm1aY9jrOw8PF5imgwAg6GMlDQ_hsx79whaQX0mPONPWMmE3GxB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efsYcHVCdQ8EAPnxxxwDgfbIBBA8bfbeWPex6FTnjvG8WVcDRkrJczhpYchWRZyEd1YBKPyRgrAikKaYbJSpuS1wavEXoMM1TF8HI1DChTF-J30_qVD5dVxhtOOOWXO_FroIHA9JSaTfAjfnN1Y6hITtH-kpP232I5DKaUBUE88lHW_wSPQV-NnitObiA0wBjVuTXtP2NI7SC-GXByEnWp0vd1eh6GeQsaIXDTk.j46LjnH18YF7272CtVaXAg"}

 

Response Header (include the x-correlation-id) --->  

null : [HTTP/1.1 401 Unauthorized]
Server : [nginx]
X-Content-Type-Options : [nosniff]
X-CORRELATION-ID : [1617859392_871_1884381799_l73c014_VDP_WS]
Connection : [keep-alive]
X-SERVED-BY : [l73c014]
Pragma : [no-cache]
Date : [Thu, 08 Apr 2021 05:23:12 GMT]
X-Frame-Options : [SAMEORIGIN]
X-APP-STATUS : [401]
Strict-Transport-Security : [max-age=2592000;includeSubdomains]
Cache-Control : [no-cache, no-store, must-revalidate]
Expires : [-1]
X-XSS-Protection : [1; mode=block]
Content-Length : [112]
Content-Type : [application/json;charset=UTF-8]

 

Response Body  ---->  {"responseStatus":{"status":401,"code":"9210","severity":"ERROR","message":"Token validation failed","info":""}}

SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: MLE token validation failed with 401

Hi @chambofadhili90,

 

Since the call to the helloworld ping test is successful, this means that your project credentials and certificate are working properly.

 

For the Push Funds Transaction API, MLE is not enforced. Can you please check in your project's "Summary" tab to see whether the MLE toggle button is on or off? If it is set to OFF, then you don't need to encrypt the request payload. If it is set to ON, then you'll need to encrypt the request payload with the MLE specific credentials.

 

PushFundsTransaction_MLEToggle.jpg

 

Hope this helps, please let me know how it goes. Thanks.

 


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.
developers
Helper

Re: MLE token validation failed with 401

Hi Stacey,

I had to do two things to make it work. first I had to enforce the use of MLE verifications and then I had to adjust the iat value by +90 to make it work. Thanks for your time.

SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: MLE token validation failed with 401

Hi @developers,

 

Happy to hear the API is working for you. Thanks for sharing with us what you needed to change to make it work. 


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.