This API supports two types of credentials.
Create whichever credentials are appropriate for your project:
OAuth 2.0: Whenever your application requests private user
data, it must send an OAuth 2.0 token along with the request. Your
application first sends a client ID and, possibly, a client secret to
obtain a token. You can generate OAuth 2.0 credentials for web
applications, service accounts, or installed applications.
Note: Since this API doesn't have any methods
that require OAuth 2.0 authorization, you might only need to obtain
API keys, which are described
below. However, if your application calls other APIs that require user
authorization, then you still need OAuth 2.0 credentials.
API keys:
A request that does not provide an OAuth 2.0 token must send an API
key.
The key identifies your project and provides API access, quota, and
reports.
The API supports several types of restrictions on API keys. If the API key that you
need doesn't already exist, then create an API key in the Console by
clicking Create credentials
> API key. You can restrict the key before using it
in production by clicking Restrict key and selecting one of the
Restrictions.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-27 UTC."],[],[],null,["# Authorize requests\n\nYour application needs to identify itself every time it sends a request to\nthe Cloud SQL Admin API, by including an [API key](//cloud.google.com/docs/authentication/api-keys) with each\nrequest.\n\nAcquiring and using an API key\n------------------------------\n\nTo acquire an API key:\n\n1. Open the [Credentials page](https://console.cloud.google.com/apis/credentials) in the Google Cloud console.\n2. This API supports two types of credentials. Create whichever credentials are appropriate for your project:\n - **OAuth 2.0:** Whenever your application requests private user\n data, it must send an OAuth 2.0 token along with the request. Your\n application first sends a client ID and, possibly, a client secret to\n obtain a token. You can generate OAuth 2.0 credentials for web\n applications, service accounts, or installed applications.\n\n **Note:** Since this API doesn't have any methods\n that require OAuth 2.0 authorization, you might only need to obtain\n [API keys](#console_public_api_keys), which are described\n below. However, if your application calls other APIs that require user\n authorization, then you still need OAuth 2.0 credentials.\n\n For more information, see the [OAuth 2.0 documentation](https://developers.google.com/identity/protocols/OAuth2).\n - **API keys:**\n\n A request that does not provide an OAuth 2.0 token must send an API\n key.\n\n The key identifies your project and provides API access, quota, and\n reports.\n\n The API supports several types of restrictions on API keys. If the API key that you\n need doesn't already exist, then create an API key in the Console by\n clicking **[Create credentials](https://console.cloud.google.com/apis/credentials) \\\u003e API key** . You can restrict the key before using it\n in production by clicking **Restrict key** and selecting one of the\n **Restrictions**.\n\nTo keep your API keys secure, follow the [best practices for\nsecurely using API keys](//cloud.google.com/docs/authentication/api-keys).\n\nAfter you have an API key, your application can append the query parameter\n`key=`\u003cvar translate=\"no\"\u003eyourAPIKey\u003c/var\u003e to all request URLs.\n\nThe API key is safe for embedding in URLs; it doesn't need any encoding."]]