API Key Authentication with Google Cloud API Gateway and Cloud Run Posted on February 10, 2024February 15, 2024 By Justin Enable API Gateway API Earlier, when you ran the gcloud command to create the API Gateway API, I mentioned that you should note the managedService value because you were gonna need it later. Well, now’s the time. Don’t worry, though. If you forgot it or lost it, gcloud is here to help. Just run: gcloud api-gateway apis describe {{API_ID}} --project={{PROJECT_ID}} Where: {{API_ID}}: The ID of the API Gateway API created in the previous section. (e.g. demo-api). {{PROJECT_ID}}: Name of the Google Cloud project you’re using for the tutorial (e.g. api-gateway-key-auth-demo) And you should see something like this: Now we just need to run another quick gcloud command to enable that API so we can actually grant the key we’ll create in the next section access to call it. gcloud services enable {{MANAGED_SERVICE}} --project={{PROJECT_ID}} Where: {{MANAGED_SERVICE}}: The managedService value for our API (e.g. demo-api-3lapraml8emj1.apigateway.api-gateway-key-auth-demo.cloud.goog). {{PROJECT_ID}}: Name of the Google Cloud project you’re using for the tutorial (e.g. api-gateway-key-auth-demo) Pages: 1 2 3 4 5 6 7 8 9 10 11 12 Backend Stuff APICloud RunGCPPythonTutorial