Skip to content

Authentication: With token

Authenticate with a KSeF token and return an authenticated client.

Called on client.authentication
Source src/ksef2/clients/auth.py:70 Generated from async source src/ksef2/clients/async_auth.py
client.authentication.with_token
client.authentication.with_token(*, ksef_token: str, nip: str, context_type: ContextIdentifierType = 'nip', timeout: float = 60.0, poll_interval: float = 1.0) -> AuthenticatedClient

Returns

AuthenticatedClient

Parameters

ksef_token str
required / keyword-only
nip str
required / keyword-only
context_type ContextIdentifierType
default 'nip' / keyword-only
timeout float
default 60.0 / keyword-only
poll_interval float
default 1.0 / keyword-only
Called on async_client.authentication
Source src/ksef2/clients/async_auth.py:68 Authored source
await async_client.authentication.with_token
await async_client.authentication.with_token(*, ksef_token: str, nip: str, context_type: ContextIdentifierType = 'nip', timeout: float = 60.0, poll_interval: float = 1.0) -> AsyncAuthenticatedClient

Returns

AsyncAuthenticatedClient

Parameters

ksef_token str
required / keyword-only
nip str
required / keyword-only
context_type ContextIdentifierType
default 'nip' / keyword-only
timeout float
default 60.0 / keyword-only
poll_interval float
default 1.0 / keyword-only