- I have a question regarding API calls. I have a iOS app - that talks to a web server
- The app make api calls. These api's calls are essentially using http and php/js file/function).
- The api call (php/js) talks to the web server (http) and does some db (mongo) manipulation to pull appropriate content
What I would like to understand is how can I can hardcode a key or auth model in the iOS app in connection with my webserver to restrict the communication to the APP and the WebServer.
- that way - someone does not call the API directly and introduce garbage in the db.
- that way only the app (downloaded from the app store) can talk to the webserver/api server.
I understand this may not be the most secure manner to restrict communication between server and client - but I am open to other ideas as well.
thanks