ADK for TypeScript: API Reference
    Preparing search index...

    Class AutoAuthCredentialExchanger

    Automatically selects the appropriate credential exchanger based on the auth scheme. Ported from Python implementation.

    // Common case: a built-in exchanger handles the credential.
    const exchanger = new AutoAuthCredentialExchanger();
    const result = await exchanger.exchange({
    authScheme: serviceAccountScheme,
    authCredential: serviceAccountCredential,
    });
    // result.credential carries an OAuth token as a bearer token.
    // Use CustomAuthExchanger for OAuth2 instead of the built-in exchanger.
    const exchanger = new AutoAuthCredentialExchanger({
    [AuthCredentialTypes.OAUTH2]: new CustomAuthExchanger(),
    });

    Implements

    Constructors

    Methods