I am creating a Kibana Plugin using the kibana plugin generator, and I have a route defined that is using the elasticsearch dataClient to get a token:
However, I get an error:
Error: called with an invalid endpoint: security.getToken
But I know that this should be a valid endpoint because it is listed here as an API.
Why is this error being thrown? Is there another way to get the token?