[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-03 (世界標準時間)。"],[[["\u003cp\u003eAPI Gateway offers multiple authentication methods for different applications and use cases, validating requests before forwarding them to the API backend.\u003c/p\u003e\n"],["\u003cp\u003eAPI keys, which are strings identifying a Google Cloud project, are used for quota, billing, and monitoring, and are embedded in API calls.\u003c/p\u003e\n"],["\u003cp\u003eService accounts utilize JSON Web Tokens (JWTs) for secure authentication of services making requests to your API, which are well-suited for microservices.\u003c/p\u003e\n"]]],[],null,["# Choosing an Authentication Method\n=================================\n\nAPI Gateway supports multiple authentication methods that are suited to different applications and use cases. API Gateway uses the authentication method that you specify in your service configuration to validate incoming requests before passing them to your API backend. This page provides an overview for each supported authentication method in API Gateway.\n\nAPI keys\n--------\n\nAn API key is a simple string that identifies a\nGoogle Cloud project for quota, billing, and monitoring purposes. A\ndeveloper generates an API key in a project in the Google Cloud console and\nembeds that key in every call to your API as a query parameter or in a request header.\n\n### Use case\n\nTo use API Gateway features such as\n[quotas](/api-gateway/docs/quotas-overview), you can pass in an API\nkey so that API Gateway can identify the Google Cloud project\nthat the client application is associated with. For more information, see\n[Using API Keys](/api-gateway/docs/authenticate-api-keys).\n\nService accounts\n----------------\n\nTo identify a service that sends requests to your API, you use a\n[service account](/docs/authentication#service_accounts). The calling service\nuses the service account's private key to sign a secure\n[JSON Web Token (JWT)](https://jwt.io/)\nand sends the signed JWT in the request to your API.\n\n### Use case\n\nJWTs and service accounts are well suited for microservices. For more\ninformation, see\n[Authentication between services](/api-gateway/docs/authenticate-service-account)."]]