Claude Platform Docs

Проверить учётные данные MCP OAuth

$client->beta->vaults->credentials->mcpOAuthValidate(string credentialID, string vaultID, ?list<AnthropicBeta> betas, ?string workspaceID): ManagedAgentsCredentialValidation
POST/v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate
Requires anthropic-beta: managed-agents-2026-04-01. How to send beta headers

Проверить учётные данные MCP OAuth

Parameters
vaultID: string⁠Path parameter

Identifier of the vault containing the credential.

credentialID: string⁠Path parameter

Unique identifier of the credential to validate.

betas?: optional list<AnthropicBeta>⁠Header parameter

This endpoint is in beta: requests must send managed-agents-2026-04-01 in this header.

workspaceID?: optional string⁠Header parameter

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Returns
class ManagedAgentsCredentialValidation { $type = 'vault_credential_validation'; $credentialID; $hasRefreshToken; /* 5 more */ }
"vault_credential_validation" type
string credentialID

Unique identifier of the credential that was validated.

bool hasRefreshToken

Whether the credential has a refresh token configured.

Details of the MCP probe step that failed, or null if the probe succeeded or there was no access token to test.

Details of the refresh-token exchange attempted on a 401. Null when no refresh was attempted.

Overall verdict of the validation probe.

\Datetime validatedAt

When the validation probe was performed.

string vaultID

Identifier of the vault containing the credential.

Проверить учётные данные MCP OAuth
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

$client = new Client(apiKey: 'my-anthropic-api-key');

$betaManagedAgentsCredentialValidation = $client
  ->beta
  ->vaults
  ->credentials
  ->mcpOAuthValidate(
  'vcrd_011CZkZEMt8gZan2iYPQfSkw',
  vaultID: 'vlt_011CZkZDLs7fYzm1hXNPeRjv',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
  workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);

var_dump($betaManagedAgentsCredentialValidation);
Returns Examples
Response 200
{
  "credential_id": "vcrd_011CZkZEMt8gZan2iYPQfSkw",
  "has_refresh_token": true,
  "mcp_probe": {
    "http_response": {
      "body": "body",
      "body_truncated": true,
      "content_type": "content_type",
      "status_code": 0
    },
    "method": "method"
  },
  "refresh": {
    "http_response": {
      "body": "body",
      "body_truncated": true,
      "content_type": "content_type",
      "status_code": 0
    },
    "status": "succeeded"
  },
  "status": "valid",
  "type": "vault_credential_validation",
  "validated_at": "2026-03-15T10:00:00Z",
  "vault_id": "vlt_011CZkZDLs7fYzm1hXNPeRjv"
}