Karve app icon

Karve

Authentication api-key-query.http

API key query parameter .http example

Use a query-string key only when the API provider requires it; headers keep credentials out of logs more reliably.

api-key-query.http

@baseUrl = https://api.example.com
@apiKey = replace-with-api-key

### Send an API key in the query string
GET {{baseUrl}}/weather?city=Oslo&api_key={{apiKey}}
Accept: application/json

Variables to replace

baseUrl
The service origin.
apiKey
The provider-issued API key used by the api_key query parameter.

Expected response

The example expects a 200 OK JSON weather response. Providers usually return 401 or 403 when the query key is absent or invalid.

Related examples and guides

Learn the full syntax in the .http file format guide, manage secrets with variables and environments, or see how to run .http files on Windows.

Launch Summer Sale

Run this request without leaving Windows.

Karve opens .http files as a native workspace: edit the plain text, press Run, inspect the response, and keep the file in Git.

15-day free trial · No account · No subscription · No metered requests

25% off until Sep 1