Appengine API calls: Application restrictions: HTTP referrers (websites) or IP addresses (web servers, cron jobs, etc.)

Viewed 298

How to set the restrictions on a Google API key when accessing an API with URL fetch call from an appengine backend?

Options:

  1. HTTP referrers: https://[projectID].appspot.com without any luck.
  2. IP Address: Not sure what appengine IP address is? Wouldn't it change?

API Key restrictions

1 Answers

If you want to use the App Engine IP addresses, please check the IP address part of the App Engine knowledge base. App Engine uses a block of IP address, so you will need to allow all of them.

You should be able to use your HTTP referrer if your app makes the HTTP API call with the key (such a making a GET request to an API with the key in the parameters).

Please check out all the details on the restrictions here for references.

Related