square / square-nodejs-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How Call API's directly from Frontend(React)

arjun-gurumoorthy opened this issue · comments

I wants to directly access a Endpoint: https://connect.squareupsandbox.com/v2/locations from my React application directly without using backend. How can we achieve this. When we tried to access we have got the CORS origin issue

Unfortunately these are server only SDKs as they require an authentication token that you don't want to expose to your users. Noted in the Requirements section.

Is there any way we could change this to make it more apparent?


If you're concerned about the work required to setup a full backend, you could look into using a serverless solution.