diff --git a/snippets/api-keys.mdx b/snippets/api-keys.mdx index d9680275a..04df6ae47 100644 --- a/snippets/api-keys.mdx +++ b/snippets/api-keys.mdx @@ -8,10 +8,10 @@ If you're interested in obtaining an API key, you can generate one for free in t ## Usage with cURL -The API key is passed in the `header` of your HTTP API request with `x-hiro-api-key`. +The API key is passed in the `header` of your HTTP API request with `x-api-key`. ```bash title="Terminal" -curl https://api.hiro.so/... -H 'x-hiro-api-key: ' +curl https://api.hiro.so/... -H 'x-api-key: ' ``` ## Usage with Node @@ -23,7 +23,7 @@ async function makeApiRequest(apiKey: string) { const url = `https://api.hiro.so/`; const response = await fetch(url, { headers: { - "x-hiro-api-key": apiKey // [!code highlight] + "x-api-key": apiKey // [!code highlight] } }); return response.json(); @@ -34,4 +34,4 @@ async function makeApiRequest(apiKey: string) { The API key is passed in the header of your HTTP API request and is used only for private use, like in server-side applications. If you use the API key in your client-side application, attackers can capture it using the client tools (E.g., browser console) and abuse your API key. - \ No newline at end of file +