Android Question Web service API keys. How to use?

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
Web service API keys. How to use?

Some web services has an API key. For example an information the weather service.

This key should be placed inside the app? In Manifest? This is safe?

This is the best practice? Remember that the key will be distributed to all devices.
 

susu

Well-Known Member
Licensed User
Longtime User
You can use http request to call API then parse the result. To hide your API key you can encrypt it, when you need to call API just decrypt it first.
Another way is making a "middle script" on your server then call API through it.

Note: No matter which option you choose, a good hacker still always know where you hide your API endpoint.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…