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

# API requests refused without a User-Agent

> Fix 429 Too Many Requests and 403 Forbidden responses with the code USER_AGENT_REQUIRED by sending a User-Agent header with your Ravion API requests.

A script, CI job or integration that calls the [Ravion API](https://www.ravion.com/docs/api-reference/overview.md) gets one of these responses:

```http theme={null}
HTTP/1.1 429 Too Many Requests
Content-Type: application/json

{"code":"USER_AGENT_REQUIRED","message":"..."}
```

```http theme={null}
HTTP/1.1 403 Forbidden
Content-Type: application/json

{"code":"USER_AGENT_REQUIRED","message":"..."}
```

Often only some requests fail: the first few in a burst succeed and the rest get `429`. Parallel CI jobs that call the API at the same time hit this most.

## Why this happens

Ravion's edge firewall checks every request before it reaches the API. Almost all automated abuse of the API sends no `User-Agent` header, so requests without one are limited much more strictly than requests with one:

* Requests to sign-in and sign-up paths (`/auth/`) without a `User-Agent` are always refused with `403`.
* Requests with neither a `User-Agent` nor an `Authorization` header share a strict per-IP rate limit. Once an IP address exceeds it, the rest of those requests get `429` until its rate drops.

Requests that send a `User-Agent` aren't subject to either rule. Requests authenticated with an API key aren't subject to the rate limit, but may be checked more strictly in the future, so send a `User-Agent` with them too.

Browsers, `curl`, the [Ravion CLI](https://www.ravion.com/docs/cli/overview.md) and most HTTP libraries send a `User-Agent` by default. Requests go out without one when a client sets the header list itself, a library or proxy strips it, or the code sets it to an empty string.

## Fix: send a User-Agent header

Add a `User-Agent` header that names your client to every request:

```bash theme={null}
curl https://api.ravion.com/projects \
  -H "Authorization: Bearer $RAVION_API_KEY" \
  -H "User-Agent: my-ci/1.0"
```

Any non-empty value works. A name and version you choose, such as `my-company-ci/1.0`, also helps Ravion support find your requests if you contact us.

Retrying requests without a `User-Agent` doesn't help. Each retry counts toward the same limit, so a retry loop keeps the IP address over it.

## Fix: use the Ravion CLI

The [Ravion CLI](https://www.ravion.com/docs/cli/overview.md) sends `ravion-cli/<version>` as its `User-Agent` on every request. If your script only needs commands the CLI offers, calling the CLI instead of the API also avoids the problem.

## Check what your client sends

Before you point your client at an external echo service, remove the `Authorization` header, cookies and any other secrets from the request, so you don't send your API key to a third party. Then send the request to a service such as `https://httpbin.org/headers` instead of `https://api.ravion.com`, keeping the same `User-Agent` settings, and read the headers it received. If `User-Agent` is missing or empty in the response, your client is not sending one.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.