Hi, I'm starting as developer using the API and I get an error of CORS.
When I make the request https://sandbox.api.visa.com/vdp/helloworld?apikey={apikey} on POSTMAN I get the complete response
{
"timestamp": "2017-03-29T20:32:03",
"message": "helloworld"
}
But when I make the request using the module @angular/http in nodeJS I get an 403 error.
I know my x-pay-token is correct in bouth request because I get it with my application in Angular and then I pasted on POSTMAN.
GET helloworld?apikey=LGJTUW...VwdNybbY4dUPhkI5HknY4gE | sandbox.api.visa.com | 0 B |
| ||||||||||||||||||||||
OPTIONS helloworld?apikey=LGJTUW...VwdNybbY4dUPhkI5HknY4gE | 403 Forbidden | sandbox.api.visa.com | 306 B | 96.16.21.33:443 | 2.5s |
Accept | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
Accept-Encoding | gzip, deflate, br |
Accept-Language | es-MX,es-ES;q=0.9,es;q=0.7,es-AR;q=0.6,es-CL;q=0.4,en-US;q=0.3,en;q=0.1 |
Access-Control-Request-He... | content-type,x-pay-token |
Access-Control-Request-Me... | GET |
Connection | keep-alive |
DNT | 1 |
Host | sandbox.api.visa.com |
Origin | http://localhost:4200 |
User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 |
I undestand that the "OPTION" call is made because the header "x-pay-token" is added.
I appreciate any kind of help. Thanks.
Hello,
Do you have some news with above case ? I'm strugling with same issue sometime. Sometime I've also get 401 response while using that service.
Thank,
Thomas
Hi @tommy_bco,
The 403 (Forbidden) HTTP Status code indicates that the project does not have permission to access the requested resource. This can happen if you are trying to invoke an API request for a resource that is not part of your project e.g. if you have created a project with Foreign Exchange Rates Product but are trying to use the same credentials to access Visa Consumer Transaction Controls. Please ensure that you are using a project and the credential for the project which includes the API being accessed.
Please also check out the below X-Pay-Token troubleshooting guide and possible solutions to common errors:
Hope it helps, if you continue to run into any issues, please reach back out and provide the following details:
I m also experiencing the same trouble. Don't know why is it occurring again and again.
Hi @shamilagul,
Can you please share the following details?
Thanks.
The problem has resolved. Thanks for your response.
Great to hear! How did you resolve it?