{
  "description": "agentidentitycredentials.googleapis.com API.",
  "mtlsRootUrl": "https://agentidentitycredentials.mtls.googleapis.com/",
  "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."
        }
      }
    }
  },
  "servicePath": "",
  "schemas": {
    "GoogleCloudAgentidentitycredentialsV1beta_Success": {
      "id": "GoogleCloudAgentidentitycredentialsV1beta_Success",
      "description": "Message indicating successful retrieval of credentials.",
      "type": "object",
      "properties": {
        "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"
        },
        "header": {
          "description": "The HTTP header name where the token should be placed.",
          "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.",
          "format": "google-datetime",
          "type": "string"
        },
        "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"
          }
        }
      }
    },
    "GoogleCloudAgentidentitycredentialsV1beta_Pending": {
      "id": "GoogleCloudAgentidentitycredentialsV1beta_Pending",
      "description": "Indicates that the credential retrieval is pending. The caller should retry the RetrieveCredentials request after some time.",
      "type": "object",
      "properties": {}
    },
    "GoogleCloudAgentidentitycredentialsV1beta_UriConsentRequired": {
      "id": "GoogleCloudAgentidentitycredentialsV1beta_UriConsentRequired",
      "type": "object",
      "properties": {
        "authorizationUri": {
          "type": "string",
          "description": "Output only. The URL where the user should be redirected to grant consent. This will always be present.",
          "readOnly": true
        },
        "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": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The unique ID of the credentials retrieval operation."
        }
      },
      "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"
    },
    "GoogleCloudAgentidentitycredentialsV1beta_RetrieveCredentialsRequest": {
      "type": "object",
      "properties": {
        "userId": {
          "description": "Required. The identity of the end user.",
          "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"
        },
        "forceRefreshToken": {
          "type": "string",
          "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."
        },
        "scopes": {
          "description": "Optional. The OAuth scopes required for this access.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "Request message for RetrieveCredentials.",
      "id": "GoogleCloudAgentidentitycredentialsV1beta_RetrieveCredentialsRequest"
    },
    "GoogleCloudAgentidentitycredentialsV1beta_ConsentRejected": {
      "id": "GoogleCloudAgentidentitycredentialsV1beta_ConsentRejected",
      "type": "object",
      "properties": {},
      "description": "Indicates the user has rejected the permission delegation or cancelled the request."
    },
    "GoogleCloudAgentidentitycredentialsV1beta_FinalizeCredentialsResponse": {
      "description": "Response message for FinalizeCredentials. Intentionally empty",
      "type": "object",
      "properties": {},
      "id": "GoogleCloudAgentidentitycredentialsV1beta_FinalizeCredentialsResponse"
    },
    "GoogleCloudAgentidentitycredentialsV1beta_RetrieveCredentialsResponse": {
      "description": "Response message for RetrieveCredentials. Contains the access tokens and related artifacts.",
      "type": "object",
      "properties": {
        "uriConsentRequired": {
          "description": "Message indicating uri based consent is required.",
          "$ref": "GoogleCloudAgentidentitycredentialsV1beta_UriConsentRequired"
        },
        "consentRejected": {
          "$ref": "GoogleCloudAgentidentitycredentialsV1beta_ConsentRejected",
          "description": "Message indicating consent was rejected."
        },
        "success": {
          "$ref": "GoogleCloudAgentidentitycredentialsV1beta_Success",
          "description": "Message indicating credentials were successfully retrieved."
        },
        "pending": {
          "description": "Message indicating credential retrieval is pending.",
          "$ref": "GoogleCloudAgentidentitycredentialsV1beta_Pending"
        }
      },
      "id": "GoogleCloudAgentidentitycredentialsV1beta_RetrieveCredentialsResponse"
    },
    "GoogleCloudAgentidentitycredentialsV1beta_FinalizeCredentialsRequest": {
      "id": "GoogleCloudAgentidentitycredentialsV1beta_FinalizeCredentialsRequest",
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "description": "Required. The identity of the end user."
        },
        "userIdValidationState": {
          "type": "string",
          "description": "Required. The encrypted state passed back from the consent flow.",
          "format": "byte"
        },
        "consentNonce": {
          "description": "Required. The same consent_nonce value that was provided during redirect in the UriConsentRequired metadata.",
          "type": "string"
        }
      },
      "description": "Request message for FinalizeCredentials."
    }
  },
  "version": "v1beta",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "fullyEncodeReservedExpansion": true,
  "name": "agentidentitycredentials",
  "version_module": true,
  "baseUrl": "https://agentidentitycredentials.googleapis.com/",
  "protocol": "rest",
  "ownerDomain": "google.com",
  "rootUrl": "https://agentidentitycredentials.googleapis.com/",
  "documentationLink": "https://cloud.google.com/iam/docs/",
  "basePath": "",
  "ownerName": "Google",
  "canonicalName": "Agent Identity Credentials",
  "title": "Agent Identity Credentials API",
  "revision": "20260717",
  "parameters": {
    "access_token": {
      "type": "string",
      "description": "OAuth access token.",
      "location": "query"
    },
    "alt": {
      "default": "json",
      "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.",
      "location": "query",
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ]
    },
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "$.xgafv": {
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "type": "string",
      "enum": [
        "1",
        "2"
      ],
      "description": "V1 error format.",
      "location": "query"
    },
    "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"
    },
    "quotaUser": {
      "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.",
      "location": "query",
      "type": "string"
    },
    "prettyPrint": {
      "default": "true",
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "location": "query"
    },
    "oauth_token": {
      "type": "string",
      "description": "OAuth 2.0 token for the current user.",
      "location": "query"
    },
    "callback": {
      "description": "JSONP",
      "location": "query",
      "type": "string"
    },
    "fields": {
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query"
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    }
  },
  "discoveryVersion": "v1",
  "resources": {
    "projects": {
      "resources": {
        "locations": {
          "resources": {
            "authProviders": {
              "resources": {
                "credentials": {
                  "methods": {
                    "retrieve": {
                      "path": "v1beta/{+authProvider}/credentials:retrieve",
                      "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.",
                      "scopes": [
                        "https://www.googleapis.com/auth/cloud-platform"
                      ],
                      "parameterOrder": [
                        "authProvider"
                      ],
                      "httpMethod": "POST",
                      "request": {
                        "$ref": "GoogleCloudAgentidentitycredentialsV1beta_RetrieveCredentialsRequest"
                      },
                      "response": {
                        "$ref": "GoogleCloudAgentidentitycredentialsV1beta_RetrieveCredentialsResponse"
                      },
                      "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/authProviders/{authProvidersId}/credentials:retrieve",
                      "parameters": {
                        "authProvider": {
                          "required": true,
                          "pattern": "^projects/[^/]+/locations/[^/]+/authProviders/[^/]+$",
                          "type": "string",
                          "description": "Required. The parent resource name of the AuthProvider. Format: `projects/{project}/locations/{location}/authProviders/{auth_provider}`",
                          "location": "path"
                        }
                      },
                      "id": "agentidentitycredentials.projects.locations.authProviders.credentials.retrieve"
                    },
                    "finalize": {
                      "path": "v1beta/{+authProvider}/credentials:finalize",
                      "description": "Finalizes the credentials after a successful consent flow.",
                      "scopes": [
                        "https://www.googleapis.com/auth/cloud-platform"
                      ],
                      "parameterOrder": [
                        "authProvider"
                      ],
                      "httpMethod": "POST",
                      "request": {
                        "$ref": "GoogleCloudAgentidentitycredentialsV1beta_FinalizeCredentialsRequest"
                      },
                      "response": {
                        "$ref": "GoogleCloudAgentidentitycredentialsV1beta_FinalizeCredentialsResponse"
                      },
                      "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/authProviders/{authProvidersId}/credentials:finalize",
                      "parameters": {
                        "authProvider": {
                          "required": true,
                          "pattern": "^projects/[^/]+/locations/[^/]+/authProviders/[^/]+$",
                          "type": "string",
                          "description": "Required. The resource name of the AuthProvider. Format: `projects/{project}/locations/{location}/authProviders/{auth_provider}`",
                          "location": "path"
                        }
                      },
                      "id": "agentidentitycredentials.projects.locations.authProviders.credentials.finalize"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "kind": "discovery#restDescription",
  "batchPath": "batch",
  "id": "agentidentitycredentials:v1beta"
}
