Skip to content

Fix critical auth: send access-token header instead of Authorization: Bearer#4

Merged
pimfeltkamp merged 2 commits intomainfrom
fix-auth-header-access-token
Apr 28, 2026
Merged

Fix critical auth: send access-token header instead of Authorization: Bearer#4
pimfeltkamp merged 2 commits intomainfrom
fix-auth-header-access-token

Conversation

@pimfeltkamp
Copy link
Copy Markdown
Contributor

Summary

Critical bug: every authenticated request currently fails. The transport sends Authorization: Bearer <token>, which the AWS API Gateway in front of api.cryptohopper.com/v1/* rejects (405 Missing Authentication Token).

Cryptohopper's Public API v1 uses access-token: <token>. Switching the SDK to send that.

Confirmation

Changes

Compatibility

No public-API change. Same caller-facing surface; only the wire-level header changes.

Test plan

  • pytest — 60/60 pass
  • (manual) CRYPTOHOPPER_TOKEN=<real> python -c "from cryptohopper import CryptohopperClient; print(CryptohopperClient(api_key=...).user.get())" should now succeed where it would have 405'd

Cross-reference

Tracking: cryptohopper-resources#9. Sister PRs landing for Node/Go/Ruby/Rust/PHP/Dart/Swift in this same iter.

Critical: every authenticated request was being rejected by the
AWS API Gateway in front of api.cryptohopper.com/v1/*. Switching
to access-token: <token> as documented in the official Cryptohopper
API docs and used by the legacy iOS/Android SDKs.

Bump to 0.4.0a2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Exchange and Marketplace sections claimed those endpoints
accepted anonymous calls. The auth-header fix in this PR establishes
that EVERY endpoint on api.cryptohopper.com/v1/* requires a real
token (the AWS API Gateway has no anonymous routes), so the README
labels were misleading. Replaces them with comments that match
reality.
@pimfeltkamp
Copy link
Copy Markdown
Contributor Author

Pushed a small follow-up commit (Drop ... README claim ...) that strikes the matching (public, no auth) / (public — no auth required) claim from the README. Same bug surface as this PR — the auth fix establishes that every endpoint requires a real token, so the README label was misleading. No re-review needed beyond skimming the +1/-1 (or +2/-2) README diff.

@pimfeltkamp pimfeltkamp merged commit e96163d into main Apr 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant