Validate Credential MCP OAuth
Check whether one MCP OAuth credential in a vault is still valid.
/anthropic/v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate◐ PartialRequest parameters
vault_idstring必填path: Vault ID (path or query parameter).
credential_idstring必填path: Path parameter: the credential ID.
vault_idstring必填query: Vault ID (path or query parameter).
Returns
400
Applies to OAuth credentials only; other types return 400. The result is always HTTP 200 with status valid, invalid or unknown; mcp_probe describes the failing step only when the check does not pass, and refresh appears only when a refresh was attempted.
Errors follow the Claude Managed Agents format — see error codes
Response
HTTP 200
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| credential_id | string | Unique identifier of the credential that was validated. |
| has_refresh_token | boolean | Whether the credential has a refresh token configured. |
| mcp_probe | null | object | The failing step of an MCP validation probe. |
| mcp_probe.http_response | null | object | An HTTP response captured during a credential validation probe. |
| mcp_probe.method | string | The MCP method that failed (for example `initialize` or `tools/list`). |
| refresh | null | object | Outcome of a refresh-token exchange attempted during credential validation. |
| refresh.http_response | null | object | An HTTP response captured during a credential validation probe. |
| refresh.status | string | Outcome of a refresh-token exchange attempted during credential validation. - `succeeded` - The token endpoint returned a new access token. - `failed` - The token endpoint returned an error response. See `http_response` for detail. - `connect_error` - The token endpoint could not be reached (DNS, TLS, or connection error). - `no_refresh_token` - No refresh token is stored for the credential, so no exchange was attempted. |
| status | string | Overall verdict of a credential validation probe. |
| type | string | |
| validated_at | string | A timestamp in RFC 3339 format |
| vault_id | string | Identifier of the vault containing the credential. |
Example prerequisite
This example targets the static credential created earlier, so its captured response is 400 invalid_request_error. For a validation result, complete user authorization, then replace credential_id with the resulting OAuth secret ID. OAuth validation returns HTTP 200 with status valid, invalid or unknown.
Archive CredentialPartial
Archive a credential in a vault; archived ones can no longer be used to connect.
Google Gemini-compatible API
The Gemini API's native paths and request shapes, for models that declare support for the Google protocol. Point your Google GenAI SDK's base_url at the address below and change nothing else.