> For the complete documentation index, see [llms.txt](https://docs.tyrads.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tyrads.com/publishers-integrations/publisher-api/authentication.md).

# Authentication

The Publisher API uses an API key and API secret to authenticate requests.

You can request your API key and secret from the TyrAds team. To authenticate a request, provide the both API key and API secret in the header of the request:

| Header Name  | Value             |
| ------------ | ----------------- |
| X-Api-Key    | YOUR\_API\_KEY    |
| X-Api-Secret | YOUR\_API\_SECRET |

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "X-Api-Key: YOUR_API_KEY" -H "X-Api-Secret: YOUR_API_SECRET" https://api.tyrads.com
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

# Create headers with the API key and secret
headers = {
    'X-Api-Key': 'YOUR_API_KEY',
    'X-Api-Secret': 'YOUR_API_SECRET',  # You can add other headers as needed
}
# Set API URL
url = 'https://api.tyrads.com/'

# Make the API request with the headers
response = requests.get(url, headers=headers)
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Please be sure to keep your API key and secret secure! Do not share them in emails, chat messages, client-side code, or publicly accessible sites.

If you have accidentally shared an API key and secret publicly, please contact the TyrAds team to revoke it
{% endhint %}
