Making API call visa POST and passing in API key
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Making API call visa POST and passing in API key
I'm attempting to make a POST request.
Passing in the API Key through the query and get a "token validation failed" message.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Making API call visa POST and passing in API key
Thank you for your question, @stockcompare. An agent will get back to you as soon as possible. In the meantime, if any community member knows the solution, please reply to this thread!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Making API call visa POST and passing in API key
Hi @stockcompare,
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.
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.
Thanks,
Illana