hi
i cannot get a 200 response on hellow world...
the request:
GET https://sandbox.api.visa.com/vdp/helloworld?apikey=XXXXXXXX HTTP/1.1 Accept-Encoding: gzip,deflate Accept: application/json x-pay-token: xv2:1537428864:16d5113156914625c0c98a9bcd02bc423cf46784648c6aefcd9efd58c1fa2771 Host: sandbox.api.visa.com Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
the response:
HTTP/1.1 401 Unauthorized Server: Apache X-SERVED-BY: l73c038 X-CORRELATION-ID: 1537429274_671_84_l73c038_VDP_ARM X-APP-STATUS: 401 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: 112 Date: Thu, 20 Sep 2018 07:41:14 GMT Connection: keep-alive {"responseStatus":{"status":401,"code":"9201","severity":"ERROR","message":"Token validation failed","info":""}}
the apikey and shared secret are from the credentials tab
i used the code and steps from the x-pay-token tutorial (https://developer.visa.com/pages/working-with-visa-apis/x-pay-token)
can someone point to the problem ?
Solved! Go to Solution
Hi @asafa,
To resolve the issue, please navigate to the Support page provided below. I've also copy/paste the resolution from the Support page in this post.
Support > Frequently Asked Questions > I’m getting Error 401 – Unauthorized. What does this mean and how can I resolve this?
https://developer.visa.com/pages/support
The 401 (Unauthorized) status code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource (or endpoint). Visa Developer supports multiple authentication and authorization methods. The request could fail due to one of the following reasons:
X-Pay-Token
Common Root Causes:
Resolution:
Mutual SSL
Common Root Causes:
Resolution:
Hi @asafa,
That's great to hear that you have resolved the problem! Since the new project works, is there any reason that you want to use the original project credentials instead? If the new project credentials are successfully functioning, I would recommend using the new project for your code testing.
Please note, that each project has its own test data and credentials so you will not be able to use a project's credentials for another project. If you mix/swap the credentials of a project with another project that you have created, then you will receive error.
Hi,
I know that this topic already has a solution but I like to share my experiences and my solution on exactly the same problem.
In my case the solution was that I have to use the cert environment to get a successful response from helloworld, because my project has been promoted to Certification state and if I tried to use the API key and shared secret in sandbox I've got the 9201 Token validation failed error.
I hope this can help to someone.