> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hudhud.sa/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> How to authenticate your requests to Hudhud Maps APIs.

Hudhud uses two types of API keys depending on the service you are accessing.

## Secret Keys

For backend services like **Geocoding** and **Routing**, use your **Secret Key** in the `Authorization` header as a Bearer token. This key should never be exposed in client-side code (browsers or mobile apps).

```http theme={null}
Authorization: Bearer <your_secret_key>
```

## Publishable Keys

For frontend services like **Map Styles**, use your **Publishable Key** (`pk_...`) directly in the query parameters. This key is safe to use in your web or mobile frontend.

```http theme={null}
https://b.hudhud.sa/v1/maps/styles/{map_id}?api_key=pk_your_publishable_key
```

## Getting Your Keys

API keys are managed through the Hudhud Console. To get access to your **Secret** and **Publishable** keys, please reach out to the Hudhud team at [hello@hudhud.sa](mailto:hello@hudhud.sa).
