> For the complete documentation index, see [llms.txt](https://docs.ruuvi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ruuvi.com/ruuvi-gateway-firmware/examples/configuration-download-from-a-remote-server-via-api.md).

# Configuration download from a remote server via API

You can trigger a forced configuration download programmatically, using bearer authentication, but you must first configure the Gateway to use [Automatic configuration download](/ruuvi-gateway-firmware/gateway-html-pages/automatic-configuration-download.md).

Configuration on the remote server must contain the field **lan\_auth\_api\_key\_rw**:

```json
{
  "remote_cfg_use": true, 
  "remote_cfg_url": "http://192.168.1.101:7000/", 
  "remote_cfg_refresh_interval_minutes": 10,
  "remote_cfg_auth_type": "no",
  "lan_auth_api_key_rw": "1SDrQH1FkH+pON0GsSjt2gYeMSP02uYqfuu7LWdaBvY="
}
```

Example of a command to trigger a configuration download from the preconfigured remote server:

```
curl -v http://<RUUVI_GW_IP>/gw_cfg_download 
    -H "Authorization: Bearer 1SDrQH1FkH+pON0GsSjt2gYeMSP02uYqfuu7LWdaBvY=" -d ''
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.ruuvi.com/ruuvi-gateway-firmware/examples/configuration-download-from-a-remote-server-via-api.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.
