Tokeny
Tokeny KSeF obsługujesz przez auth.tokens.
Generowanie
Dział zatytułowany „Generowanie”token = auth.tokens.generate( permissions=["invoice_read"], description="Reporting", timeout=60.0, poll_interval=1.0,)print(token.token)timeout jest podawany w sekundach.
status = auth.tokens.status(reference_number=token.reference_number)print(status.status)Listowanie
Dział zatytułowany „Listowanie”for page in auth.tokens.list_all(): for token in page.tokens: print(token.reference_number, token.status)Unieważnienie
Dział zatytułowany „Unieważnienie”auth.tokens.revoke(reference_number="token-reference")