Hacker News new | ask | show | jobs
by Kiro 4480 days ago
How should an app utilizing an API send the API key so it can't be hijacked with tcpdump?
2 comments

You can't really avoid it. If the API key is hardcoded in the client, it's just a matter of time and patience until it's extracted. Never trust the client.
By using HTTPS/SSL. But the onus of that is on the API provider...
It also doesn't help that much - you can still look up the api key in the package, which isn't a whole lot harder. You could probably sign your own cert, tell your device to trust it, and MITM it, too.