MCP TypeScript SDK (V2)
    Preparing search index...
    • Exchange a refresh token for an updated access token.

      Supports multiple client authentication methods as specified in OAuth 2.1:

      • Automatically selects the best authentication method based on server support
      • Preserves the original refresh token if a new one is not returned

      Parameters

      Returns Promise<
          {
              access_token: string;
              expires_in?: number;
              id_token?: string;
              refresh_token?: string;
              scope?: string;
              token_type: string;
          },
      >

      Promise resolving to OAuth tokens (preserves original refresh_token if not replaced)

      When token refresh fails or authentication is invalid