Reputation: 178
I need some guidance to secure my Google API.
I've created an Android Application that sends requests to my API. Once I've put my application up for download, how can i ensure that only my application can call my backend API.
I understand that once they have registered with my application, i would be able to use OAuth to provide the security.
However, before they register, what's to stop someone spamming my backend API on creating a new user (Registration).
Upvotes: 0
Views: 37
Reputation: 669
You need to generate a client ID for your Android app in the development console (console.developers.google.com), then include this ID in an API annotation for your endpoint.
You can find detailed instructions in the following tutorial, under the heading "Specifying authorized clients in the API backend":
Upvotes: 1