Interface CreateAuthTokenConfig

Optional parameters.

interface CreateAuthTokenConfig {
    abortSignal?: AbortSignal;
    expireTime?: string;
    httpOptions?: HttpOptions;
    liveConnectConstraints?: LiveConnectConstraints;
    lockAdditionalFields?: string[];
    newSessionExpireTime?: string;
    uses?: number;
}

Properties

abortSignal?: AbortSignal

Abort signal which can be used to cancel the request.

NOTE: AbortSignal is a client-only operation. Using it to cancel an operation will not cancel the request in the service. You will still be charged usage for any applicable operations.

expireTime?: string

An optional time after which, when using the resulting token, messages in Live API sessions will be rejected. (Gemini may preemptively close the session after this time.)

If not set then this defaults to 30 minutes in the future. If set, this value must be less than 20 hours in the future.

httpOptions?: HttpOptions

Used to override HTTP request options.

liveConnectConstraints?: LiveConnectConstraints

Configuration specific to Live API connections created using this token.

lockAdditionalFields?: string[]

Additional fields to lock in the effective LiveConnectParameters.

newSessionExpireTime?: string

The time after which new Live API sessions using the token resulting from this request will be rejected.

If not set this defaults to 60 seconds in the future. If set, this value must be less than 20 hours in the future.

uses?: number

The number of times the token can be used. If this value is zero then no limit is applied. Default is 1. Resuming a Live API session does not count as a use.