Skip to content

Commit e9acb95

Browse files
authored
Added clarification on b64 encoding of API key (#78394)
* Added clarification on b64 encoding of API key The current documentation does not specify how to encode the response to get a valid api key, I added it from the info found here: elastic/elasticsearch#50235 (comment) * Updated for consistency with Elasticsearch docs #78394 (review)
1 parent 4f6df62 commit e9acb95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/user/security/api-keys/index.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ The response should look something like this:
7272
"api_key" : "FD6P5UA4QCWlZZQhYF3YGw"
7373
}
7474

75-
Now, you can use the API key to request {kib} roles. You will need
76-
to base64-encode the `id` and `api_key` provided in the response
77-
and add it to your request as an authorization header. For example:
75+
Now, you can use the API key to request {kib} roles. You'll need to send a request with a
76+
`Authorization` header with a value having the prefix `ApiKey` followed by the credentials,
77+
where credentials is the base64 encoding of `id` and `api_key` joined by a colon. For example:
7878

7979
[source,js]
8080
curl --location --request GET 'http://localhost:5601/api/security/role' \

0 commit comments

Comments
 (0)