- HTTP request
 - Path parameters
 - Query parameters
 - Request body
 - Response body
 - Authorization scopes
 - IAM Permissions
 - Try it!
 
Lists the API keys owned by a project. The key string of the API key isn't included in the response.
NOTE: Key is a global resource; hence the only supported value for location is global.
HTTP request
GET https://apikeys.googleapis.com/v2/{parent=projects/*/locations/*}/keys
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent | 
                
                   
 Required. Lists all API keys associated with this project. Authorization requires the following IAM permission on the specified resource  
  | 
              
Query parameters
| Parameters | |
|---|---|
pageSize | 
                
                   
 Optional. Specifies the maximum number of results to be returned at a time.  | 
              
pageToken | 
                
                   
 Optional. Requests a specific page of results.  | 
              
showDeleted | 
                
                   
 Optional. Indicate that keys deleted in the past 30 days should also be returned.  | 
              
Request body
The request body must be empty.
Response body
Response message for keys.list method.
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
{
  "keys": [
    {
      object ( | 
                  
| Fields | |
|---|---|
keys[] | 
                    
                       
 A list of API keys.  | 
                  
nextPageToken | 
                    
                       
 The pagination token for the next page of results.  | 
                  
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platform.read-onlyhttps://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the parent resource:
apikeys.keys.list
For more information, see the IAM documentation.