Skip to content

LeanTokenCredentials

QuantConnect.Brokerages.Authentication.LeanTokenCredentials

LeanTokenCredentials(
    token_type: TokenType, access_token: str
)
LeanTokenCredentials()

Bases: RestResponse

Represents credentials required for token-based authentication, including the access token and its type (e.g., Bearer).

Initializes a new instance of the LeanTokenCredentials class.

Parameters:

Name Type Description Default
token_type Optional[TokenType]

The type of the token.

None
access_token Optional[str]

The token string.

None

token_type

token_type: TokenType

Gets the type of the token (e.g., Bearer).

access_token

access_token: str

Gets the token string used for authentication.

success

success: bool

Indicate if the API request was successful.

errors

errors: List[str]

List of errors with the API call.

to_string

to_string() -> str

Returns the string representation of this object