Skip to content

docs: fix instant API key response casing in examples - #2006

Closed
Osraka wants to merge 1 commit into
ProjectOpenSea:mainfrom
Osraka:docs/fix-instant-api-key-casing
Closed

docs: fix instant API key response casing in examples#2006
Osraka wants to merge 1 commit into
ProjectOpenSea:mainfrom
Osraka:docs/fix-instant-api-key-casing

Conversation

@Osraka

@Osraka Osraka commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • use apiKey when destructuring OpenSeaSDK.requestInstantApiKey() in the README and quick-start guide
  • keep .api_key unchanged in the raw curl examples

Why

The SDK camelizes the endpoint response and its return type exposes apiKey. The current TypeScript examples use the wire-format api_key, which fails with TS2339 and leaves the constructor without the returned key.

Validation

  • reproduced the current example as a standalone TypeScript consumer: Property api_key does not exist
  • verified the apiKey version type-checks against the built declarations
  • npm run format:check -- README.md developerDocs/quick-start.md
  • npm run lint
  • npm run check-types
  • npm run build
  • npm test (49 files, 1016 tests)

@ryanio

ryanio commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Thanks, this is a real one. requestInstantApiKey ends with camelizeKeysDeep(raw), so the resolved object is { apiKey, expiresAt }, and the JSDoc on both OpenSeaAPI and the OpenSeaSDK passthrough already showed apiKey. These two examples were missed when the camelization itself was fixed, so your change finishes that cleanup.

Keeping .api_key in the curl examples was the right call, since those read the raw wire response.

Recreated in our internal monorepo with you credited as co-author, and it is on this mirror as of the sync just now. This repo is a read-only mirror so we cannot merge PRs here. Closing as applied.

@ryanio ryanio closed this Sep 5, 2026
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.

2 participants