I am building an Android app, and server, that does not require users to log in. The app gets data from the server.
How can I authenticate requests to the server, that my app is requesting data from the server, not any malicious trying to take down the server?
How can I authenticate each request?
You can’t. Anything you used to authenticate code could be faked by malicious code, or a hacked version of your app. What you can do is authenticate the user via shared secret (a password) that they need to enter in order to login, and use that to authenticate additional requests. But you can’t know for sure that it’s your code originating the request, and you can’t stop a user from using alternative code to access your server if they have the correct shared secret to access it.