[[reference-security-create_service_token]] //////// =========================================================================================================================== || || || || || || || ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ || || ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ || || ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ || || ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ || || ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ || || ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ || || || || || || This file is autogenerated, DO NOT send pull requests that changes this file directly. || || You should update the script that does the generation, which can be found in: || || https://github.com/elastic/elastic-client-generator-js || || || || You can run the script with the following command: || || npm run elasticsearch -- --version || || || || || || || =========================================================================================================================== //////// [discrete] === client.security.createServiceToken Create a service account token. Create a service accounts token for access without requiring basic authentication. {ref}/security-api-create-service-token.html[{es} documentation] [discrete] ==== Function signature [source,ts] ---- (SecurityCreateServiceTokenRequest, options?): Promise ---- [discrete] ===== `SecurityCreateServiceTokenRequest` [source,ts] ---- interface SecurityCreateServiceTokenRequest extends <> { namespace: <> service: <> name?: <> refresh?: <> } ---- [discrete] ===== `SecurityCreateServiceTokenResponse` [source,ts] ---- interface SecurityCreateServiceTokenResponse { created: boolean token: SecurityCreateServiceTokenToken } ----