Enterprise Open source Grafana Cloud

Authentication options for the HTTP APIs

Authentication options depend on whether you’re using Grafana on prem or Grafana Cloud.

To set up organizations, refer to the X-Grafana-Org-Id header section.

Authentication options in Grafana OSS/Enterprise

You can authenticate HTTP API requests using basic authentication or a service account token.

Basic auth

This option is available in Grafana on prem only.

Basic auth is enabled by default and allows you authenticate your HTTP request via standard basic auth. Basic auth also authenticates LDAP users.

For example:

Bash
curl http://admin:admin@localhost:3000/api/org
{"id":1,"name":"Main Org."}

Service account token

To create a service account token:

  1. Go to Administration in the left-side menu
  2. Click Users and access > Service Accounts.

For more information on how to use service account tokens, refer to the