{
  "mtlsRootUrl": "https://agentidentitycredentials.mtls.googleapis.com/",
  "version_module": true,
  "version": "v1",
  "basePath": "",
  "resources": {
    "projects": {
      "resources": {
        "locations": {
          "resources": {
            "authProviders": {
              "resources": {
                "credentials": {
                  "methods": {
                    "retrieve": {
                      "request": {
                        "$ref": "GoogleCloudAgentidentitycredentialsV1_RetrieveCredentialsRequest"
                      },
                      "description": "Retrieves authorization credentials for an authprovider, or indicates what action needs to be taken to obtain credentials. If the `token` field in the response is populated, credential retrieval was successful. If one of the fields in the `status` oneof is populated, further action is required to obtain credentials, such as redirecting the user for consent. View comments on `RetrieveCredentialsResponse` for more information.",
                      "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authProviders/{authProvidersId}/credentials:retrieve",
                      "httpMethod": "POST",
                      "path": "v1/{+authProvider}/credentials:retrieve",
                      "response": {
                        "$ref": "GoogleCloudAgentidentitycredentialsV1_RetrieveCredentialsResponse"
                      },
                      "scopes": [
                        "https://www.googleapis.com/auth/cloud-platform"
                      ],
                      "parameterOrder": [
                        "authProvider"
                      ],
                      "id": "agentidentitycredentials.projects.locations.authProviders.credentials.retrieve",
                      "parameters": {
                        "authProvider": {
                          "pattern": "^projects/[^/]+/locations/[^/]+/authProviders/[^/]+$",
                          "type": "string",
                          "required": true,
                          "location": "path",
                          "description": "Required. The parent resource name of the AuthProvider. Format: `projects/{project}/locations/{location}/authProviders/{auth_provider}`"
                        }
                      }
                    },
                    "finalize": {
                      "id": "agentidentitycredentials.projects.locations.authProviders.credentials.finalize",
                      "parameters": {
                        "authProvider": {
                          "description": "Required. The resource name of the AuthProvider. Format: `projects/{project}/locations/{location}/authProviders/{auth_provider}`",
                          "location": "path",
                          "pattern": "^projects/[^/]+/locations/[^/]+/authProviders/[^/]+$",
                          "type": "string",
                          "required": true
                        }
                      },
                      "scopes": [
                        "https://www.googleapis.com/auth/cloud-platform"
                      ],
                      "parameterOrder": [
                        "authProvider"
                      ],
                      "path": "v1/{+authProvider}/credentials:finalize",
                      "response": {
                        "$ref": "GoogleCloudAgentidentitycredentialsV1_FinalizeCredentialsResponse"
                      },
                      "request": {
                        "$ref": "GoogleCloudAgentidentitycredentialsV1_FinalizeCredentialsRequest"
                      },
                      "description": "Finalizes the credentials after a successful consent flow.",
                      "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authProviders/{authProvidersId}/credentials:finalize",
                      "httpMethod": "POST"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "name": "agentidentitycredentials",
  "canonicalName": "Agent Identity Credentials",
  "description": "agentidentitycredentials.googleapis.com API.",
  "schemas": {
    "GoogleCloudAgentidentitycredentialsV1_Success": {
      "description": "Message indicating successful retrieval of credentials.",
      "type": "object",
      "id": "GoogleCloudAgentidentitycredentialsV1_Success",
      "properties": {
        "scopes": {
          "description": "The scopes actually associated with the retrieved token. End users may have rejected some requested scopes, or the third-party authorization servers can return a different set of scopes than what was asked for. Callers should verify that all required scopes for their intended use are included in this list.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "header": {
          "description": "The HTTP header name where the token should be placed.",
          "type": "string"
        },
        "token": {
          "description": "The retrieved access token or credential for the end user. On MCPTool call, for an invalid token OAuth spec says this should return 401 or 403, but MCPServers may implement this differently. If you get any flavor of `PERMISSION_DENIED`, retry your original request to RetrieveCredentials with force_refresh_token set to the expired/invalid token string, which will fetch a new token or initiate a new consent flow.",
          "type": "string"
        },
        "expireTime": {
          "description": "The expiration time of the token. This does not guarantee that the token will be valid until this time, since the token could be revoked earlier. There could also be clock skew between the auth provider and the client so it may expire slightly earlier. If not set, the token might be permanent or it may be that the service does not (or cannot) know when it will expire.",
          "type": "string",
          "format": "google-datetime"
        }
      }
    },
    "GoogleCloudAgentidentitycredentialsV1_FinalizeCredentialsRequest": {
      "description": "Request message for FinalizeCredentials.",
      "type": "object",
      "id": "GoogleCloudAgentidentitycredentialsV1_FinalizeCredentialsRequest",
      "properties": {
        "userId": {
          "description": "Required. The identity of the end user.",
          "type": "string"
        },
        "userIdValidationState": {
          "description": "Required. The encrypted state passed back from the consent flow.",
          "type": "string",
          "format": "byte"
        },
        "consentNonce": {
          "description": "Required. The same consent_nonce value that was provided during redirect in the UriConsentRequired metadata.",
          "type": "string"
        }
      }
    },
    "GoogleCloudAgentidentitycredentialsV1_FinalizeCredentialsResponse": {
      "id": "GoogleCloudAgentidentitycredentialsV1_FinalizeCredentialsResponse",
      "properties": {},
      "description": "Response message for FinalizeCredentials. Intentionally empty",
      "type": "object"
    },
    "GoogleCloudAgentidentitycredentialsV1_Pending": {
      "id": "GoogleCloudAgentidentitycredentialsV1_Pending",
      "properties": {},
      "description": "Indicates that the credential retrieval is pending. The caller should retry the RetrieveCredentials request after some time.",
      "type": "object"
    },
    "GoogleCloudAgentidentitycredentialsV1_UriConsentRequired": {
      "id": "GoogleCloudAgentidentitycredentialsV1_UriConsentRequired",
      "properties": {
        "consentNonce": {
          "readOnly": true,
          "description": "Output only. A one-time, randomly generated value that validates the entire consent flow is handled by a single user, avoiding CSRF attacks. It must be submitted with the FinalizeCredentials request to complete the OAuth exchange. This will always be present. Implemented per https://www.rfc-editor.org/rfc/rfc6819#section-5.3.5",
          "type": "string"
        },
        "uid": {
          "description": "Output only. The unique ID of the credentials retrieval operation.",
          "type": "string",
          "readOnly": true
        },
        "authorizationUri": {
          "description": "Output only. The URL where the user should be redirected to grant consent. This will always be present.",
          "type": "string",
          "readOnly": true
        }
      },
      "description": "Indicates that the user must visit the provided URI to consent to delegate permission to the agent to act on their behalf. The caller can either poll the `RetrieveCredentials` method, or await the /ValidateUserId callback",
      "type": "object"
    },
    "GoogleCloudAgentidentitycredentialsV1_RetrieveCredentialsResponse": {
      "id": "GoogleCloudAgentidentitycredentialsV1_RetrieveCredentialsResponse",
      "properties": {
        "success": {
          "description": "Message indicating credentials were successfully retrieved.",
          "$ref": "GoogleCloudAgentidentitycredentialsV1_Success"
        },
        "pending": {
          "description": "Message indicating credential retrieval is pending.",
          "$ref": "GoogleCloudAgentidentitycredentialsV1_Pending"
        },
        "uriConsentRequired": {
          "$ref": "GoogleCloudAgentidentitycredentialsV1_UriConsentRequired",
          "description": "Message indicating uri based consent is required."
        },
        "consentRejected": {
          "$ref": "GoogleCloudAgentidentitycredentialsV1_ConsentRejected",
          "description": "Message indicating consent was rejected."
        }
      },
      "description": "Response message for RetrieveCredentials. Contains the access tokens and related artifacts.",
      "type": "object"
    },
    "GoogleCloudAgentidentitycredentialsV1_ConsentRejected": {
      "id": "GoogleCloudAgentidentitycredentialsV1_ConsentRejected",
      "properties": {},
      "description": "Indicates the user has rejected the permission delegation or cancelled the request.",
      "type": "object"
    },
    "GoogleCloudAgentidentitycredentialsV1_RetrieveCredentialsRequest": {
      "id": "GoogleCloudAgentidentitycredentialsV1_RetrieveCredentialsRequest",
      "properties": {
        "userId": {
          "description": "Required. The identity of the end user.",
          "type": "string"
        },
        "scopes": {
          "description": "Optional. The OAuth scopes required for this access.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "forceRefreshToken": {
          "description": "Optional. Input only. Set this field only if the previous token was expired or invalid. This value must be the full, previously returned token string. Will trigger a refresh of the access token with a stored refresh token, if possible, or a new consent flow.",
          "type": "string"
        },
        "continueUri": {
          "description": "Optional. The URI to redirect the user to after consent is completed. This field is required for authproviders using the 3-legged OAuth flow. For other authprovider types, this field is unused but not rejected.",
          "type": "string"
        }
      },
      "description": "Request message for RetrieveCredentials.",
      "type": "object"
    }
  },
  "ownerName": "Google",
  "ownerDomain": "google.com",
  "protocol": "rest",
  "parameters": {
    "upload_protocol": {
      "location": "query",
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
    },
    "uploadType": {
      "location": "query",
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")."
    },
    "oauth_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth 2.0 token for the current user."
    },
    "$.xgafv": {
      "description": "V1 error format.",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "type": "string",
      "enum": [
        "1",
        "2"
      ],
      "location": "query"
    },
    "callback": {
      "location": "query",
      "type": "string",
      "description": "JSONP"
    },
    "quotaUser": {
      "location": "query",
      "type": "string",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters."
    },
    "access_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth access token."
    },
    "fields": {
      "location": "query",
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "key": {
      "type": "string",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query"
    },
    "alt": {
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "description": "Data format for response.",
      "default": "json",
      "location": "query",
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ]
    },
    "prettyPrint": {
      "location": "query",
      "default": "true",
      "type": "boolean",
      "description": "Returns response with indentations and line breaks."
    }
  },
  "fullyEncodeReservedExpansion": true,
  "documentationLink": "https://cloud.google.com/iam/docs/",
  "discoveryVersion": "v1",
  "revision": "20260717",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/cloud-platform": {
          "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."
        }
      }
    }
  },
  "baseUrl": "https://agentidentitycredentials.googleapis.com/",
  "batchPath": "batch",
  "rootUrl": "https://agentidentitycredentials.googleapis.com/",
  "icons": {
    "x32": "http://www.google.com/images/icons/product/search-32.gif",
    "x16": "http://www.google.com/images/icons/product/search-16.gif"
  },
  "title": "Agent Identity Credentials API",
  "kind": "discovery#restDescription",
  "id": "agentidentitycredentials:v1",
  "servicePath": ""
}
