Is rest api available from client-side javascript?


#1

Hello, I try to write small web-application which requet data from twitter api. I was looking for javascript sdk but here is only sdk for backend side: C#,java, node.js. does it mean that i cannot get data from browser javascript?


#2

That’s kind of correct. Twitter API would need to support CORS and additionally with client side Javascript your app token and secret would be exposed to the public. Best way to handle is, I guess, is to make a backend proxy script that just returns the needed data to your client side JS code.