# API Key

{% hint style="info" %}
Do you need a key? Contact your sales rep or contact to request one to start developing.
{% endhint %}

### Key Types <a href="#key-types" id="key-types"></a>

#### Secret API Key <a href="#secret-api-key" id="secret-api-key"></a>

A secret API key is for the server side and should not be shared with the front end.

Example Key: `sec_23hcfb8374bfhc833i4uhx`

#### Public API Key <a href="#public-api-key" id="public-api-key"></a>

Your website uses a public API key to call the API. These keys are limited to your domain and are safe to share publicly.

Example Key: `pub_3ficuhb34u8fnxu34h9fm`

### Authenticating Requests <a href="#authenticating-requests" id="authenticating-requests"></a>

All requests to our APIs must include an ApiKey header for authentication.

Include your API key in the request headers as shown below:

```bash
curl -X GET "https://api.autograb.com.au/v2/endpoint" \
  -H "ApiKey: your-api-key-here"
```

### Other Authentication Methods <a href="#authenticating-requests" id="authenticating-requests"></a>

We also support [OAuth](/authentication/oauth-authentication.md), and you can read more about this authentication mechanism here.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devhub.autograb.com/authentication/api-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
