This guide explains how to authenticate API requests to HashiCorp Consul using ACL tokens in HTTP headers.
In this guide, you’ll learn how to authenticate API requests to HashiCorp Consul by supplying your ACL token in the HTTP header. Consul supports two equivalent header options:
X-Consul-Token
Authorization: Bearer
Both methods achieve the same result—authorizing your request against the Consul ACL system—so you can choose the one that best fits your environment.
Always keep your ACL tokens secure. Never commit them to version control or expose them in public logs.