Question

in my project, I am calling webservice with http get request. API key is also there in http get parameter. in j2me devices before connecting to the internet it is showing the URL and asking for permission to user.Here user can easily see my api key.

and i don't want to store api key in my application also.because using decompiler anybody can get api key from applciation.

So my question is where to store api key and how to use it for calling web services?

Was it helpful?

Solution

If the API key is required to use the webservice, then you MUST store it somewhere in your app...By the way, you can store it in some kind of an encrypted way, so a simple decompile does not reveal it.

If the user should enter the API key, the you can store it in the standard RMS store outside of your app, again maybe encrypted.

An for the URL issue, use HTTP POST request instead of HTTP GET, and send the key in the post data.

OTHER TIPS

You could encrypt the api key and store it as you do just now and then POST it to the web service.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top