Google Endpoints and Api Public Key

To use the Google service, you can use OAuth authentication or, if you do not need to enter the user into the system, you can use the api public key, defining the authorized domain as the request source. Now I am writing my own API using google endpoints, and I will allow users to use my api public key APIs rather than using OAuth, GAE has a built-in method, or I need to write my own code to check the api key and the origin of the request to to my APIs?

+4
source share
3 answers

If you use a client key, you can restrict those who can access your API by specifying a list of referrers on the Google console, if you use a server API key, you can limit it by specifying an IP list that I believe cannot be done with GAE, since we do not have an IP address for the server, which can be changed at any time.

+1
source

If you do not use authentication, you do not need to specify an api key, I think.

0
source

.

, , . :

- :
 - OAuth API
 - cilent ( ) .
 - , .
 - , " oauth" .
:
- Evry - .
- Evrybody evry methodo -, gapi.client.xxxx.list → API.

0

Source: https://habr.com/ru/post/1538373/


All Articles