Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion dexpaprika_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
Stats
)

__version__ = "0.12.1"
__version__ = "0.12.2"
__all__ = [
"DexPaprikaClient",
# Exceptions
Expand Down
10 changes: 4 additions & 6 deletions dexpaprika_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("/")
Expand Down Expand Up @@ -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)

Expand Down
Loading