Reputation: 1857
I need to call smartsheet api inside my web application. Browser is blocking request to smartsheet api with Access-Control-Allow-Origin error. what should I do?
Does smartsheet provide any way to call api inside another application?
Edit:
So I need to use node js module "smartsheet". After using that I am getting timeout error. If I call API using postman it works.
what should I do?
Upvotes: 0
Views: 490
Reputation: 637
The Smartsheet API doesn't have support for CORS which is required to be able to reach out to the API directly from a browser. To be able to reach the Smartsheet API instead you would need to make a request from the backend of your web application on a server. The Javascript SDK is written in Node.js and is meant to be used on a server. It cannot be used directly in a browser. You could setup your own Node.js server with the Smartsheet Javascript SDK and have your application reach out from the browser back to your server. Then your server can make requests as needed to Smartsheet and return back the necessary data to the application running in the browser to present the dta to the user.
Upvotes: 1