<p dir="ltr">You can make it non-trivial for someone to access the back end directly, but I don't think you can ever make it impossible. Any type of secret that you embed in the application, could always be extracted. </p>
<div class="gmail_quote">On May 30, 2016 7:43 AM, "saikat_sarkar" <<a href="mailto:saikat_sarkar@hotmail.com">saikat_sarkar@hotmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
<div>Stop this spam</div>
<div><br>
</div>
<div><br>
</div>
<div style="font-size:9px">Saikat</div>
<div style="font-size:9px">Sent from Samsung Mobile</div>
<br>
<br>
-------- Original message --------<br>
From: aiman parvaiz <u></u><br>
Date:30/05/2016 1:16 PM (GMT+05:30) <br>
To: Unai Rodriguez <u></u><br>
Cc: <a href="mailto:flask@python.org" target="_blank">flask@python.org</a> <br>
Subject: Re: [Flask] Flask secret key for mobile app client <br>
<br>
<div>
<div dir="ltr">
<div>
<div>The case under consideration is that right now any one can jump on a tool as simple as Postman(on Chrome browser), construct the API call and get data from the backend. I need a way to allow only mobile devices with the installed app to see the returned
 data and how can I ensure that a API call from any client other than mobile devices don't get a response from my server.<br>
<br>
</div>
I would appreciate any help I can get here.<br>
<br>
</div>
Thanks<br>
</div>
<div><br>
<div>On Mon, May 30, 2016 at 12:07 AM, Aiman Parvaiz <span dir="ltr">
<<a href="mailto:aimanparvaiz@gmail.com" target="_blank">aimanparvaiz@gmail.com</a>></span> wrote:<br>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto">
<div>Thanks for the response Unai. This app would be open to the general public indeed. Can you please throw more light on SSL+ authentication?</div>
<div>I would be using SSL for this but what do you mean by authentication from mobile phone?</div>
<div><br>
<br>
Sent from my iPhone</div>
<div>
<div>
<div><br>
On May 29, 2016, at 9:09 PM, Unai Rodriguez <<a href="mailto:unai@sysbible.org" target="_blank">unai@sysbible.org</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div>If the people using the app can be anyone (I.e. it's open to general public) you cannot. Typically SSL I.e. HTTPS) plus authentication is used for this.<br>
</div>
<div> </div>
<div>If the people that are supposed to access have something in common (I.e. they come from a specific office, etc) then you might be able to add rules on a firewalll. But that can be a problem (rules not correct or people accessing through a VPN etc). I guess
 the only way is if the app is served only to the people that are supposed to access the through some sort of a corporate /private network .<br>
</div>
<div> </div>
<div> </div>
<div> </div>
<div>
<div>-- unai<br>
</div>
</div>
<div> </div>
<div> </div>
<div>On Mon, May 30, 2016, at 09:56 AM, aiman parvaiz wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>Hi all<br>
</div>
<div>I am new to flask and am writing a REST API backend for a mobile app. My question is how can I ensure that call to my endpoints is only being done by my mobile app and not by some one who has guessed the endpoint.
<br>
</div>
</div>
<div>What would be the best way to avoid this kind of behavior.<br>
</div>
</div>
<div>Thanks<br>
</div>
</div>
<div><u>_______________________________________________</u><br>
</div>
<div>Flask mailing list<br>
</div>
<div><a href="mailto:Flask@python.org" target="_blank">Flask@python.org</a><br>
</div>
<div><a href="https://mail.python.org/mailman/listinfo/flask" target="_blank">https://mail.python.org/mailman/listinfo/flask</a><br>
</div>
</blockquote>
<div> </div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>Flask mailing list</span><br>
<span><a href="mailto:Flask@python.org" target="_blank">Flask@python.org</a></span><br>
<span><a href="https://mail.python.org/mailman/listinfo/flask" target="_blank">https://mail.python.org/mailman/listinfo/flask</a></span><br>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>

<br>_______________________________________________<br>
Flask mailing list<br>
<a href="mailto:Flask@python.org">Flask@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/flask" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/flask</a><br>
<br></blockquote></div>