From 4d40ad8101235d23a52a7990252036f39ff68782 Mon Sep 17 00:00:00 2001 From: Brage Date: Fri, 7 Aug 2026 15:20:14 +0200 Subject: [PATCH] docs: better description of token usage --- en/security/guide.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/en/security/guide.md b/en/security/guide.md index 960b924f83..6b95881050 100644 --- a/en/security/guide.md +++ b/en/security/guide.md @@ -351,6 +351,19 @@ $ vespa query \ curl -H "Authorization: Bearer $TOKEN" $ENDPOINT ``` +Vespa CLI will automatically use a token if the `VESPA_CLI_DATA_PLANE_TOKEN` environment variable is set. This can be done by running: + +``` +$ export VESPA_CLI_DATA_PLANE_TOKEN=$TOKEN +``` + +Then there is no need to manually specify the token in the header: + +``` +vespa query \ + 'yql=select * from music where album contains "head"' +``` + #### Using a browser In Vespa guides, curl is used in examples, like: