diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bfaf9a..197d617 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to the DexPaprika SDK for Python will be documented in this The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.12.2] - 2026-09-29 + +### Changed +- The README and docstrings now just say to send the key on its own as the whole Authorization value. + ## [0.12.1] - 2026-09-29 ### Fixed diff --git a/README.md b/README.md index 44e5f48..9c442d3 100644 --- a/README.md +++ b/README.md @@ -55,11 +55,11 @@ client = DexPaprikaClient() An explicit argument wins over the environment variable, and no key at all keeps the previous keyless behaviour unchanged. -**There is no `Bearer` prefix.** The key is sent as the entire `Authorization` -value, which is what the API expects; `ApiKey` or `Token` in front of it returns 401. You never write -the header yourself, so this only matters if you are debugging what went out. +**Send the key on its own.** The key is the entire `Authorization` value, with +nothing in front of it. You never write the header yourself, so this only +matters if you are debugging what went out. -**Pro customers** also set the base URL, because the host does not change on its +**Dev and Pro customers** also set the base URL, because the host does not change on its own. Free keys are served from the default host and sending one to the Pro host returns 403, so the switch has to be deliberate: diff --git a/dexpaprika_sdk/__init__.py b/dexpaprika_sdk/__init__.py index 9777ba7..db6db14 100644 --- a/dexpaprika_sdk/__init__.py +++ b/dexpaprika_sdk/__init__.py @@ -27,7 +27,7 @@ Stats ) -__version__ = "0.12.1" +__version__ = "0.12.2" __all__ = [ "DexPaprikaClient", # Exceptions diff --git a/dexpaprika_sdk/client.py b/dexpaprika_sdk/client.py index d2cdf70..e2d5da7 100644 --- a/dexpaprika_sdk/client.py +++ b/dexpaprika_sdk/client.py @@ -61,13 +61,11 @@ def __init__( variable. Keyless is the default and keeps working: without a key the client behaves exactly as before. - The key is sent as the **entire** Authorization value. There is no - "Bearer" prefix and no other scheme word: the API checksums the raw - header, so a scheme word returns 401. This is the most common reason - a working key looks broken. + The key is sent as the **entire** Authorization value: the key + alone, with nothing in front of it. The host does not change when a key is present. Free keys are served - from the default base_url and only Pro moves to + from the default base_url; Dev and Pro keys call api-pro.dexpaprika.com, which callers set through base_url. """ self.base_url = base_url.rstrip("/") @@ -212,7 +210,7 @@ def request( # headers request_headers = {"User-Agent": self.user_agent} if self.api_key: - # The whole value, with no scheme word in front of it. + # The key alone, as the whole Authorization value. request_headers["Authorization"] = self.api_key if headers: request_headers.update(headers)