Software Archive
Read-only legacy content
17061 Discussions

Securing API Keys & API secret

Navin_Kumar_P_
Beginner
326 Views

Hi

I am building an app which calls multiple APIs. I have put in the API Key inside the JS files while calling the APIs. If the API Key is reset at the server, how do I dynamically reset the API Key used in the app? Also, is there a way to secure the API secret without putting it on the JS variable?

Thanks

Navin

0 Kudos
1 Reply
PaulF_IntelCorp
Employee
326 Views

Kumar -- that's a real issue that one faces with a Cordova app. I'm sure there are a variety of solutions out there, but we don't have one, in particular, to recommend. I suggest you search Stack Overflow and other resources for something like "how to hide API keys in a Cordova PhoneGap app" for some solutions that others have implemented. The XDK builds a standard Cordova app, so solutions that work with Cordova or PhoneGap should work for the XDK, as well.

0 Kudos
Reply