- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The POST API /v2/binRangeDetails is returning "Token Validation Failed":
b'{"responseStatus":{"status":401,"code":"9159","severity":"ERROR","message":"Token Validation Failed","info":""}}'
Other API: helloword sample worked
The following is the Python code:
Thanks for taking a look.
Solved! Go to Solution
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Token Validation Error (Error Code: 9159) for x-pay-token /v2/binRangeDetails
Hi @kathrynchen,
The 401 Token Validation Failed error you're getting will be seen when the x-pay-token sent in the header is invalid.
A couple of things I'd like you to note while generating the token:
- For starters, please follow the getting started documentation to generate a valid token: https://developer.visa.com/pages/working-with-visa-apis/x-pay-token
- APIkey in the url query param should be the same as the one used to generate xpayToken
- “resourcePath” sent in the xpaytoken has to be as per the documentation (eg: v2/payments?apikey={apikey}).
- Payload sent in the request payload should exactly match along with spaces to the “requestBody” value used in xpaytoken.
Can you please provide the request payload of this API call? It's possible that you're missing a field or have an inaccurate format. I'd like to see screenshot attachments of the error provided, if possible.
Also, could you check to see if you're passing a correct value for URI. For example, make sure it’s defined correctly in the beginning of your code, and use the same value for the URI in the middle of your code. In general, for cases like this (i.e. “helloworld works, but the API XX doesn’t”) I'd like to ask of you, if you could, to please extend your SOAPUI project, and make sure that you can call a particular API from SOAPUI project first.
Thanks,
Illana
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @I_Doroteo3, thanks for having a look. I figured out how to connect to the binRangeDetails API, and my solution is posted in the following thread:
In case anyone is looking for Python sample code.
Thanks,
Kathryn