API cross domain access

Anonymous
Not applicable

API cross domain access

I am trying to connect to the API but i keep getting No 'Access-Control-Allow-Origin' error.

How do i add my domain to policy to allow to talk to the API?

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: API cross domain access

You're trying to connect directly to the API from a browser that enforces CORS?

This means you are revealing your API secret key to the world.  Very, very bad idea.  The APIs must not be connected to directly from a browser.  They're meant for server-to-server access.

Anonymous
Not applicable

Re: API cross domain access

Thanks Sanford - I was never going to push it live, I just wanted to get test the API through JS and then build the server code for it.

SanfordWhiteman
Level 10 - Community Moderator

Re: API cross domain access

You might try javascript - Disable same origin policy in Chrome - Stack Overflow if you must use the browser to test.