---
title: Authentication
description: 'Authentication is disabled by default in InfluxDB v1. When disabled, the database accepts any request without checking credentials—supplied credentials are silently ignored. When enabled, every HTTP request must include valid credentials. Use one of the following schemes to authenticate to the InfluxDB v1 API: Basic authentication Query string authentication Token authentication'
url: https://docs.influxdata.com/influxdb/v1/api/authentication/
estimated_tokens: 926
product: InfluxDB OSS v1
version: v1
---

[Download InfluxDB API Spec](/openapi/influxdb-oss-v1-openapi.yml)

Authentication is **disabled by default** in InfluxDB v1. When disabled, the database accepts any request without checking credentials—supplied credentials are silently ignored. When enabled, every HTTP request must include valid credentials.

Use one of the following schemes to authenticate to the InfluxDB v1 API:

-   Basic authentication
-   Query string authentication
-   Token authentication

## Basic Authentication

Use HTTP Basic Authentication by including your username and password in the request.

```bash
curl -u username:password "http://localhost:8086/query?q=SHOW+DATABASES"
```

Or encode credentials in the URL (not recommended for production):

```bash
curl "http://username:password@localhost:8086/query?q=SHOW+DATABASES"
```

## Query String Authentication

Pass your credentials as query parameters. Use `u` for username and `p` for password.

```bash
curl "http://localhost:8086/query?u=username&p=password&q=SHOW+DATABASES"
```

Query string authentication exposes credentials in URLs and server logs. Use Basic Authentication or Token Authentication for production environments.

## Token Authentication

For v2-compatible endpoints (`/api/v2/*`), use the `Authorization` header with the `Token` scheme.

Include your InfluxDB 1.x username and password separated by a colon:

```bash
curl -H "Authorization: Token username:password" \
  "http://localhost:8086/api/v2/query"
```

This format is compatible with InfluxDB 2.x client libraries, allowing you to use the same code with both InfluxDB 1.8+ and InfluxDB 2.x.

#### Related

-   [Manage authentication and authorization](/influxdb/v1/administration/authentication_and_authorization/)
