Method: projects.serviceAccounts.keys.get

Stay organized with collections Save and categorize content based on your preferences.

Gets a ServiceAccountKey.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



Required. The resource name of the service account key in the following format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}.

Using - as a wildcard for the PROJECT_ID will infer the project from the account. The ACCOUNT value can be the email address or the uniqueId of the service account.

Authorization requires the following IAM permission on the specified resource name:

  • iam.serviceAccountKeys.get

Query parameters


enum (ServiceAccountPublicKeyType)

Optional. The output format of the public key. The default is TYPE_NONE, which means that the public key is not returned.

Request body

The request body must be empty.

Response body

If successful, the response body contains an instance of ServiceAccountKey.

Authorization Scopes

Requires one of the following OAuth scopes:


For more information, see the Authentication Overview.


Supported public key output formats.

TYPE_NONE Do not return the public key.
TYPE_X509_PEM_FILE X509 PEM format.
TYPE_RAW_PUBLIC_KEY raw public key.