Got error Token validation failed - foreignexchangerates
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
December 2023
December 2023
Got error Token validation failed - foreignexchangerates
https://sandbox.api.visa.com/forexrates/v2/foreignexchangerates
Req:
{
{
"initiatingPartyId": 1002,
"rateProductCode": "BANK",
"destinationCurrencyCode": "USD",
"sourceCurrencyCode": "EUR",
"quoteIdRequired": true
}
Resp:
Resp:
{
"responseStatus": {
"status": 401,
"code": "9209",
"severity": "ERROR",
"message": "Token validation failed",
"info": ""
}
}
I already put correct username/password.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
December 2023
December 2023
Re: Got error Token validation failed - foreignexchangerates
Thank you for reaching out, @Kimsong. An agent will look into this and get back to you as soon as possible. Until then, if any community member knows a solution, feel free to reply here.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
January 2024
January 2024
Re: Got error Token validation failed - foreignexchangerates
Hi @Kimsong,
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#get-started-overview
- 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.
Please double check these items to ensure your x-pay-token was set up correctly.
Thanks,
Illana