Search code examples
securitygoogle-app-enginegoogle-cloud-platformapi-keygoogle-cloud-endpoints-v2

Restrict API key access to only one API in Google Cloud Endpoints


I have deployed a Google Cloud Endpoints v2 API with the apiKeyRequired = AnnotationBoolean.TRUE to restrict access to clients who have a api key. I have created an api key in the Credentials page in Cloud platform and I am able to access the api with the key.enter image description here

I now want to give this API key to a third party consumer, but since I have deployed multiple API's with Google Cloud Endpoints I want to give them access to only one of them. How can I achieve that?


Solution

  • Check out this article. Basically, the customer should use their own API key, and you should grant access to the API via Cloud Console.