Visa Developer Community

Newbie

403 forbidden

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
 
 
 
 
 
 
 
 

 
 
Acceptapplication/json, text/plain, */*
Accept-Encodinggzip, deflate, br
Accept-Languagees-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
Connectionkeep-alive
Content-Typeapplication/json
DNT1
Hostsandbox.api.visa.com
Originhttp://localhost:4200
Refererhttp://localhost:4200/
User-AgentMozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
x-pay-tokenxv2:1490827829:0d6385bd4fb1d90bd12b64086a313947320b0787ec144ea3939373640842b650
 
OPTIONS helloworld?apikey=LGJTUW...VwdNybbY4dUPhkI5HknY4gE
403 Forbidden
sandbox.api.visa.com
306 B
96.16.21.33:443
 
 
 
 
 
 
2.5s
 
Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encodinggzip, deflate, br
Accept-Languagees-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
Connectionkeep-alive
DNT1
Hostsandbox.api.visa.com
Originhttp://localhost:4200
User-AgentMozilla/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.

1 REPLY 1
Community Manager

Re: 403 forbidden

Hi there,

Thank you for posting. We are looking into this for you and will get back to you very soon.

In the meantime, if any other questions come up, please let us know.

Thank you,
Ricardo



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.
Tags (1)