totalbeginner Posted September 29, 2014 Share Posted September 29, 2014 Hello, I am using some api solutions in my javascript. But, those api solutions require api keys as parameters. In this case, users can see my api keys by displaying page source? What is a true approach and solution of course? Thanks Link to comment Share on other sites More sharing options...
niche Posted September 29, 2014 Share Posted September 29, 2014 (edited) Server side. You can't protect your code client side. Edited September 29, 2014 by niche Link to comment Share on other sites More sharing options...
Ingolme Posted September 29, 2014 Share Posted September 29, 2014 People making Javascript applications simply don't care that the API keys are publicly visible. You'll have to adopt that mentality if your application is going to be Javascript-based. If keeping the API key secret is that important, program a proxy on your server for the API instead and have Javascript use AJAX to communicate with it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now