I have an app and a server side service which my app communicates with with JSON.

I need to impliment security so that if someone gets hold of the urls they will only be able to just call them.

I know i need to use Oauth2 but I don't know how to exactly.

I have read [this](http://developer.android.com/training/id-auth/authenticate.html#ConnectToService) and it seems to be what I want but it's using google accounts.

Can anyone give me an example or steps I must take to make sure only my app is able to get a response from my server?