You cannot prevent it. There are several methods that make it difficult for you to use your services.
A simple check may be to check the user agent calling your web service. Another fairly common is to use simple authentication using user / password authentication on your web server. A username and password will be added to your application.
If you have enough time, you should consider using a combination of these two methods plus authentication with an integrated ssl certificate. You can simply add this to your project, and if someone really wants to abuse your service, they should extract this certificate from at least your application.
There are other useful methods, but you cannot prevent reverse engineering or network sniffing.
Regards, fuxx
source share