Skip to content

[SCR-584] Send API key via Authorization header - #26

Merged
sahilsunny merged 3 commits into
masterfrom
sahil/scr-584-update-node-sdk-to-support-header-based-authorization
Sep 1, 2026
Merged

sahilsunny merged 3 commits into
masterfrom
sahil/scr-584-update-node-sdk-to-support-header-based-authorization

Conversation

@sahilsunny

Copy link
Copy Markdown
Contributor

Moves the API key out of the query string and into an Authorization: Bearer header, so keys stop showing up in URLs and server logs. Nothing changes for users — the client is constructed the same way.

Also adds nb_results to the Google Search params type since the API accepts it.

Tested: 70 unit tests pass, and the full live suite (22 tests) passes against the real API using header auth.

… to Google Search params

- Auth moves from ?api_key= query param to Authorization: Bearer header
  (verified live against all endpoint families); client construction unchanged
- Add nb_results?: number to GoogleSearchParams (accepted by the API)
- Update unit tests to assert the Authorization header instead of the query param
@sahilsunny
sahilsunny requested a review from a team August 18, 2026 04:01
@sahilsunny
sahilsunny merged commit bafe332 into master Sep 1, 2026
3 checks passed
@sahilsunny
sahilsunny deleted the sahil/scr-584-update-node-sdk-to-support-header-based-authorization branch September 1, 2026 07:40
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