403 forbidden

Highlighted
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.

5 REPLIES 5
Highlighted
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.
Highlighted
Newbie

Re: 403 forbidden

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

Highlighted
Visa Dev Moderator
Visa Dev Moderator

Re: 403 forbidden

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:

https://community.developer.visa.com/t5/Connection-Security-Errors/VTS-X-Pay-Token-Troubleshooting-G...

 

Hope it helps, if you continue to run into any issues, please reach back out and provide the following details:

  • End Point URL
  • Request Header
  • Request Body
  • Response Header (include the x-correlation-id)Response Body

Best,
Stacey

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

Re: 403 forbidden

I m also experiencing the same trouble. Don't know why is it occurring again and again. 

Highlighted
Visa Dev Moderator
Visa Dev Moderator

Re: 403 forbidden

Hi @shamilagul,

 

Can you please share the following details? 

  • API End Point URL
  • Request Header
  • Request Body
  • Response Header (include the x-correlation-id)Response Body
  • What tool are you using to test the API?

Thanks.


Best,
Stacey

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