1

I'm doing a test locally and whenever I hit the button from the example I found on Custom Integration I'm getting this error:

XMLHttpRequest cannot load https://link-tartan.plaid.com/client/info. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://cdn.plaid.com' is therefore not allowed access. The response had HTTP status code 403.

I've read that the server needs to add a header to the response with

Access-Control-Allow-Origin: *

However the problem is the server isn't owned by me and I'm just requesting response from an API from Plaid.

What are the options that I have that I can do and fix on my end?

JohnnyQ
  • 3,997
  • 4
  • 38
  • 57
  • You have a problem with [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS). Also check this out: https://github.com/plaid/support/issues/182 – notgiorgi Sep 16 '16 at 09:29
  • @notgiorgi thank you but that is exactly what I was following. :( I've also tried [this](http://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome) to no avail. :( – JohnnyQ Sep 16 '16 at 09:44
  • If you are using a service, and it has no CORS, then I think you're doing something wrong. Every public API has CORS allowed, or else what's the point? – notgiorgi Sep 16 '16 at 10:05
  • exactly what I thought but I'm just following a simple code found here https://plaid.com/docs/quickstart/#step-2-custom-integration which should work out of the box if you have the test key provided. :( – JohnnyQ Sep 16 '16 at 10:15

1 Answers1

2

I got a response from Plaid support. And it turned out they only support certain IP addresses. So I ask them to allow my IP address to transact to their API. Other solution would be to use a VPN, hope this helps.

JohnnyQ
  • 3,997
  • 4
  • 38
  • 57
  • I confirm that. I'm based in Brazil and have an AWS running on US. Could not get Plaid Link to work neither on my local installation nor AWS. It only worked when I used a VPN from US as well. – FlavioEscobar Oct 04 '16 at 18:28
  • I have the same issue when I use it locally and trying to make api call request from the react side (localhost:3000), but if I the same from the server side (localhost:8000) is working fine. – PanosCool May 09 '20 at 08:06
  • @PanosCool that is strange, both of those should be coming from the same IP address which is your local machine. – JohnnyQ May 11 '20 at 21:40
  • 1
    The solution was to add headers to the api call plus the token that I sent to the server needed to be `public-${token}` – PanosCool May 13 '20 at 10:26