Skip to content

Client & configuration

bidkit.client.EbayClient

with_options(**overrides)

A scoped client with config fields overridden, e.g.::

client.with_options(timeout=5.0, max_retries=0).sell.inventory.get_offers(...)

The returned client shares this client's HTTP connection pool and token cache (no new connections, no re-auth); closing it is a no-op, and any :class:EbayConfig field (timeout, max_retries, marketplace_id, retry_backoff, ...) can be overridden.

authorization_url(*, state=None, prompt=None, scopes=None)

Build the eBay consent URL to send a user to (authorization-code flow).

exchange_code(code, *, ru_name=None)

Exchange a consent code for tokens and authenticate this client with them.

Note: this mutates self.config — the returned refresh_token is stored on the config so subsequent calls run as the newly authorized user.

bidkit.client.AsyncEbayClient

with_options(**overrides)

A scoped client with config fields overridden — see :meth:EbayClient.with_options.

authorization_url(*, state=None, prompt=None, scopes=None)

Build the eBay consent URL to send a user to (authorization-code flow).

exchange_code(code, *, ru_name=None) async

Exchange a consent code for tokens and authenticate this client with them.

Note: this mutates self.config — the returned refresh_token is stored on the config so subsequent calls run as the newly authorized user.

bidkit.config.EbayConfig

Bases: BaseModel

from_file(path='~/.config/ebay-cli/config.json', *, signing_key_file=None) classmethod

Load an ebay-cli style config.json.

Credentials live under a credentials object (or at the top level) with the aliases ebay-cli uses: app_id/client_id, cert_id/client_secret, ru_name/redirect_uri, granted_scopes/scopes. Top-level environment ("sandbox"/"production") and marketplace_default map to sandbox and marketplace_id. A signing-key.json next to the config is picked up automatically; pass signing_key_file to point elsewhere.

bidkit.config.EbaySigningConfig

Bases: BaseModel

Credentials for eBay digital-signature (message signing).

Required by the Finances API and several payout/refund operations. jwe is the encrypted public key returned by the Key Management API; private_key is the matching PEM (or bare base64 PKCS#8) private key; digest selects the content-digest algorithm.

from_key_file(path) classmethod

Load signing material from an ebay-cli style signing-key.json.